зеркало из https://github.com/mozilla/gecko-dev.git
bug 546629 - fix a wrong comment in the npruntime sample plugin code, r=joshmoz
This commit is contained in:
Родитель
e0a658f9a9
Коммит
b8962d0e86
|
@ -141,15 +141,6 @@ NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==============================
|
|
||||||
// ! Scriptability related code !
|
|
||||||
// ==============================
|
|
||||||
//
|
|
||||||
// here the plugin is asked by Mozilla to tell if it is scriptable
|
|
||||||
// we should return a valid interface id and a pointer to
|
|
||||||
// nsScriptablePeer interface which we should have implemented
|
|
||||||
// and which should be defined in the corressponding *.xpt file
|
|
||||||
// in the bin/components folder
|
|
||||||
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
|
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
|
||||||
{
|
{
|
||||||
if(instance == NULL)
|
if(instance == NULL)
|
||||||
|
@ -171,6 +162,9 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
|
||||||
case NPPVpluginDescriptionString:
|
case NPPVpluginDescriptionString:
|
||||||
*((char **)value) = "NPRuntime scriptability API test plugin";
|
*((char **)value) = "NPRuntime scriptability API test plugin";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Here we indicate that the plugin is scriptable. See this page for details:
|
||||||
|
// https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins
|
||||||
case NPPVpluginScriptableNPObject:
|
case NPPVpluginScriptableNPObject:
|
||||||
*(NPObject **)value = plugin->GetScriptableObject();
|
*(NPObject **)value = plugin->GetScriptableObject();
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче