summaryrefslogtreecommitdiffstats
path: root/third_party/npapi/bindings
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 23:28:52 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 23:28:52 +0000
commit257b11401565658f9ec8ecda8b2b4a5890e278e1 (patch)
tree0c72598b92478e6bc6fbee4e4d3b0c82a22d9a4b /third_party/npapi/bindings
parentac1819a70675204a0682ebf99f56513e23655c30 (diff)
downloadchromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.zip
chromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.tar.gz
chromium_src-257b11401565658f9ec8ecda8b2b4a5890e278e1.tar.bz2
This fixes http://code.google.com/p/chromium/issues/detail?id=2472, which
is an issue with popups displayed by the flash plugin in response to a user click, getting blocked. The plugin invokes NPN_Evaluate to execute the javascript. It also invokes the NPN_PushPopupEnabledState/NPN_PopupEnabledState API's to set the popup enabled stack for the duration of the call. The fix is to add the plumbing in NPN_Evaluate to pass in a flag indicating whether popups are allowed for the duration of the call. Bug=2472 Review URL: http://codereview.chromium.org/6562 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/npapi/bindings')
-rw-r--r--third_party/npapi/bindings/npruntime.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/npapi/bindings/npruntime.h b/third_party/npapi/bindings/npruntime.h
index f1160b7..47d8fbb 100644
--- a/third_party/npapi/bindings/npruntime.h
+++ b/third_party/npapi/bindings/npruntime.h
@@ -352,6 +352,22 @@ bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);
bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count);
+// Helper function for evaluating a script in the scope of the NPObject passed in.
+// Parameters
+// npp
+// The plugin's opaque instance handle (Can be NULL)
+// popups_allowed
+// Indicates if popups created in the context of the script being executed are
+// blocked or not.
+// npobj
+// The NPObject.
+// npscript
+// The script being executed.
+// result
+// On return contains the value returned by the script.
+// Returns true on success.
+bool NPN_EvaluateHelper(NPP npp, bool popups_allowed, NPObject *npobj, NPString *npscript, NPVariant *result);
+
// BEGIN GOOGLE MODIFICATIONS
void* NPP_GetJavaClass(void);