summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-05 00:11:06 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-05 00:11:06 +0000
commit64308a71a809eaf8217a77a427164c1ccd126bf0 (patch)
treece565b4e8cdf3ba4cf78819a4f47fd400fdc9b62 /webkit
parent15b97af03991854f99a43848ca1ac84567040d0a (diff)
downloadchromium_src-64308a71a809eaf8217a77a427164c1ccd126bf0.zip
chromium_src-64308a71a809eaf8217a77a427164c1ccd126bf0.tar.gz
chromium_src-64308a71a809eaf8217a77a427164c1ccd126bf0.tar.bz2
Add stubs for NPN_PopUpContextMenu and NPN_ConvertPoint
We claim to support the version of NPAPI that includes these functions, so we at least need to stub them out to prevent crashes. Real implementations and test cases for them will follow later. BUG=29454, 29457, 28002 TEST=Right click in Flash using a ToT Chromium build with the 10.1 Flash preview installed; it should not crash. Review URL: http://codereview.chromium.org/465078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33894 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/nphostapi.h11
-rw-r--r--webkit/glue/plugins/plugin_host.cc19
2 files changed, 30 insertions, 0 deletions
diff --git a/webkit/glue/plugins/nphostapi.h b/webkit/glue/plugins/nphostapi.h
index 53c684c..7985a57 100644
--- a/webkit/glue/plugins/nphostapi.h
+++ b/webkit/glue/plugins/nphostapi.h
@@ -213,6 +213,15 @@ typedef uint32 (*NPN_ScheduleTimerPtr)(NPP npp,
void (*timerFunc)(NPP npp, uint32 timerID));
typedef void (*NPN_UnscheduleTimerPtr)(NPP npp,
uint32 timerID);
+typedef NPError (*NPN_PopUpContextMenuPtr)(NPP npp,
+ NPMenu* menu);
+typedef NPBool (*NPN_ConvertPointPtr)(NPP npp,
+ double sourceX,
+ double sourceY,
+ NPCoordinateSpace sourceSpace,
+ double *destX,
+ double *destY,
+ NPCoordinateSpace destSpace);
//
// NPAPI Function table of NPP functions (functions provided by plugin to host)
@@ -293,6 +302,8 @@ typedef struct _NPNetscapeFuncs {
NPN_GetAuthenticationInfoPtr getauthenticationinfo;
NPN_ScheduleTimerPtr scheduletimer;
NPN_UnscheduleTimerPtr unscheduletimer;
+ NPN_PopUpContextMenuPtr popupcontextmenu;
+ NPN_ConvertPointPtr convertpoint;
} NPNetscapeFuncs;
//
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc
index 8cc094f..21240c1 100644
--- a/webkit/glue/plugins/plugin_host.cc
+++ b/webkit/glue/plugins/plugin_host.cc
@@ -111,6 +111,8 @@ void PluginHost::InitializeHostFuncs() {
host_funcs_.getauthenticationinfo = NPN_GetAuthenticationInfo;
host_funcs_.scheduletimer = NPN_ScheduleTimer;
host_funcs_.unscheduletimer = NPN_UnscheduleTimer;
+ host_funcs_.popupcontextmenu = NPN_PopUpContextMenu;
+ host_funcs_.convertpoint = NPN_ConvertPoint;
}
void PluginHost::PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides) {
@@ -1189,4 +1191,21 @@ void NPN_UnscheduleTimer(NPP id, uint32 timer_id) {
if (plugin)
plugin->UnscheduleTimer(timer_id);
}
+
+NPError NPN_PopUpContextMenu(NPP instance, NPMenu* menu) {
+ NOTIMPLEMENTED();
+ return NPERR_GENERIC_ERROR;
+}
+
+NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY,
+ NPCoordinateSpace sourceSpace,
+ double *destX, double *destY,
+ NPCoordinateSpace destSpace) {
+ NOTIMPLEMENTED();
+ if (destX)
+ *destX = sourceX;
+ if (destY)
+ *destY = sourceY;
+ return FALSE;
+}
} // extern "C"