I've been making a plugin for browsers (Safari, Chrome, firefox) in MacOSX
What I try to do is using Accessibility API to find out the size and the origin for the Browser Window in my NPAPI plugin.
In Chrome, I can get what I want but In Safari, got a error code -25204
.
AXUIElementRef app = AXUIElementCreateApplication( browserProcessID );
AXUIElementRef frontWindow = NULL;
AXError err = AXUIElementCopyAttributeValue(
app, kAXMainWindowAttribute, (CFTypeRef *)&frontWindow );
if ( err != kAXErrorSuccess ) {
NSLog(@"%d", err);
return -1;
}
-25204
is kAXErrorCannotComplete in AXError.h
But I do not know why.
Any comments will be welcome.
Thanks in advance.