diff --git a/dom/plugins/PluginModuleChild.cpp b/dom/plugins/PluginModuleChild.cpp index d692e4e03f5..c8280cd1367 100644 --- a/dom/plugins/PluginModuleChild.cpp +++ b/dom/plugins/PluginModuleChild.cpp @@ -859,7 +859,10 @@ const NPNetscapeFuncs PluginModuleChild::sBrowserFuncs = { mozilla::plugins::child::_scheduletimer, mozilla::plugins::child::_unscheduletimer, mozilla::plugins::child::_popupcontextmenu, - mozilla::plugins::child::_convertpoint + mozilla::plugins::child::_convertpoint, + NULL, // handleevent, unimplemented + NULL, // unfocusinstance, unimplemented + NULL // urlredirectresponse, unimplemented }; PluginInstanceChild* diff --git a/modules/plugin/base/public/npapi.h b/modules/plugin/base/public/npapi.h index cf3f20b8f13..20cbda0e1ee 100644 --- a/modules/plugin/base/public/npapi.h +++ b/modules/plugin/base/public/npapi.h @@ -101,7 +101,7 @@ /*----------------------------------------------------------------------*/ #define NP_VERSION_MAJOR 0 -#define NP_VERSION_MINOR 25 +#define NP_VERSION_MINOR 26 /* The OS/2 version of Netscape uses RC_DATA to define the @@ -377,7 +377,7 @@ typedef enum { , NPPVpluginCoreAnimationLayer = 1003 #endif -#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) , NPPVpluginWindowlessLocalBool = 2002 #endif } NPPVariable; @@ -755,6 +755,7 @@ enum NPEventType { #define NPVERS_HAS_PRIVATE_MODE 22 #define NPVERS_MACOSX_HAS_COCOA_EVENTS 23 #define NPVERS_HAS_ADVANCED_KEY_HANDLING 25 +#define NPVERS_HAS_URL_REDIRECT_HANDLING 26 /*----------------------------------------------------------------------*/ /* Function Prototypes */ @@ -801,6 +802,7 @@ NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); NPBool NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction); void NP_LOADDS NPP_LostFocus(NPP instance); +void NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, void* notifyData); /* NPN_* functions are provided by the navigator and called by the plugin. */ void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, @@ -862,6 +864,7 @@ NPError NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu); NPBool NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace); NPBool NP_LOADDS NPN_HandleEvent(NPP instance, void *event, NPBool handled); NPBool NP_LOADDS NPN_UnfocusInstance(NPP instance, NPFocusDirection direction); +void NP_LOADDS NPN_URLRedirectResponse(NPP instance, void* notifyData, NPBool allow); #ifdef __cplusplus } /* end extern "C" */ diff --git a/modules/plugin/base/public/npfunctions.h b/modules/plugin/base/public/npfunctions.h index 0fc50ef927c..14ed0fb8f80 100644 --- a/modules/plugin/base/public/npfunctions.h +++ b/modules/plugin/base/public/npfunctions.h @@ -67,6 +67,7 @@ typedef NPError (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable typedef NPError (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value); typedef NPBool (* NP_LOADDS NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction); typedef void (* NP_LOADDS NPP_LostFocusPtr)(NPP instance); +typedef void (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData); typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value); typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value); @@ -124,6 +125,7 @@ typedef NPError (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu); typedef NPBool (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace); typedef NPBool (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool handled); typedef NPBool (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction); +typedef void (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyData, NPBool allow); typedef struct _NPPluginFuncs { uint16_t size; @@ -144,6 +146,7 @@ typedef struct _NPPluginFuncs { NPP_SetValueProcPtr setvalue; NPP_GotFocusPtr gotfocus; NPP_LostFocusPtr lostfocus; + NPP_URLRedirectNotifyPtr urlredirectnotify; } NPPluginFuncs; typedef struct _NPNetscapeFuncs { @@ -203,6 +206,7 @@ typedef struct _NPNetscapeFuncs { NPN_ConvertPointPtr convertpoint; NPN_HandleEventPtr handleevent; NPN_UnfocusInstancePtr unfocusinstance; + NPN_URLRedirectResponsePtr urlredirectresponse; } NPNetscapeFuncs; #ifdef XP_MACOSX diff --git a/modules/plugin/base/src/nsNPAPIPlugin.cpp b/modules/plugin/base/src/nsNPAPIPlugin.cpp index 0dc5073c61a..b2990a2677f 100644 --- a/modules/plugin/base/src/nsNPAPIPlugin.cpp +++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp @@ -178,7 +178,10 @@ static NPNetscapeFuncs sBrowserFuncs = { _scheduletimer, _unscheduletimer, _popupcontextmenu, - _convertpoint + _convertpoint, + NULL, // handleevent, unimplemented + NULL, // unfocusinstance, unimplemented + NULL // urlredirectresponse, unimplemented }; static PRLock *sPluginThreadAsyncCallLock = nsnull;