Home | History | Annotate | Download | only in Plugins

Lines Matching refs:instance

38 WebNetscapePluginView *pluginViewForInstance(NPP instance);
69 // instance-specific functions
70 // The plugin view is always the ndata of the instance. Sometimes, plug-ins will call an instance-specific function
71 // with a NULL instance. To workaround this, call the last plug-in view that made a call to a plug-in.
73 // This specifically works around Flash and Shockwave. When we call NPP_New, they call NPN_UserAgent with a NULL instance.
74 WebNetscapePluginView *pluginViewForInstance(NPP instance)
76 if (instance && instance->ndata)
77 return (WebNetscapePluginView *)instance->ndata;
82 NPError NPN_GetURLNotify(NPP instance, const char* URL, const char* target, void* notifyData)
84 return [pluginViewForInstance(instance) getURLNotify:URL target:target notifyData:notifyData];
87 NPError NPN_GetURL(NPP instance, const char* URL, const char* target)
89 return [pluginViewForInstance(instance) getURL:URL target:target];
92 NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData)
94 return [pluginViewForInstance(instance) postURLNotify:URL target:target len:len buf:buf file:file notifyData:notifyData];
97 NPError NPN_PostURL(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file)
99 return [pluginViewForInstance(instance) postURL:URL target:target len:len buf:buf file:file];
102 NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
104 return [pluginViewForInstance(instance) newStream:type target:target stream:stream];
107 int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
109 return [pluginViewForInstance(instance) write:stream len:len buffer:buffer];
112 NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason)
114 return [pluginViewForInstance(instance) destroyStream:stream reason:reason];
117 const char* NPN_UserAgent(NPP instance)
119 return [pluginViewForInstance(instance) userAgent];
122 void NPN_Status(NPP instance, const char* message)
124 [pluginViewForInstance(instance) status:message];
127 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
129 [pluginViewForInstance(instance) invalidateRect:invalidRect];
132 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
134 [pluginViewForInstance(instance) invalidateRegion:invalidRegion];
137 void NPN_ForceRedraw(NPP instance)
139 [pluginViewForInstance(instance) forceRedraw];
142 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
144 return [pluginViewForInstance(instance) getVariable:variable value:value];
147 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
149 return [pluginViewForInstance(instance) setVariable:variable value:value];
160 void* NPN_GetJavaPeer(NPP instance)
166 void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
170 void NPN_PopPopupsEnabledState(NPP instance)
174 void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData)
176 PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData);
179 uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID))
181 return [pluginViewForInstance(instance) scheduleTimerWithInterval:interval repeat:repeat timerFunc:timerFunc];
184 void NPN_UnscheduleTimer(NPP instance, uint32 timerID)
186 [pluginViewForInstance(instance) unscheduleTimer:timerID];
189 NPError NPN_PopUpContextMenu(NPP instance, NPMenu *menu)
191 return [pluginViewForInstance(instance) popUpContextMenu:menu];
194 NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32* len)
196 return [pluginViewForInstance(instance) getVariable:variable forURL:url value:value length:len];
199 NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32 len)
201 return [pluginViewForInstance(instance) setVariable:variable forURL:url value:value length:len];
204 NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32 port, const char* scheme, const char *realm, char** username, uint32* ulen, char** password, uint32* plen)
206 return [pluginViewForInstance(instance) getAuthenticationInfoWithProtocol:protocol
215 NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace)
217 return [pluginViewForInstance(instance) convertFromX:sourceX andY:sourceY space:sourceSpace toX:destX andY:destY space:destSpace];
220 uint32 WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool, void*), void* context)
222 return [pluginViewForInstance(instance) checkIfAllowedToLoadURL:url frame:frame callbackFunc:callbackFunc context:context];
225 void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32 checkID)
227 [pluginViewForInstance(instance) cancelCheckIfAllowedToLoadURL:checkID];
230 char* WKN_ResolveURL(NPP instance, const char* url, const char* target)
232 return [pluginViewForInstance(instance) resolveURL:url forTarget:target];