diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 19:58:15 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 19:58:15 +0000 |
commit | 35bb14330bde78b7c29609eed27c24caf7c9cd96 (patch) | |
tree | b68ac7272d45002568cbe3908ac713a5de8d0f86 /third_party | |
parent | 8327443a5a5808f784e5fdc693e6d6f1f1beb032 (diff) | |
download | chromium_src-35bb14330bde78b7c29609eed27c24caf7c9cd96.zip chromium_src-35bb14330bde78b7c29609eed27c24caf7c9cd96.tar.gz chromium_src-35bb14330bde78b7c29609eed27c24caf7c9cd96.tar.bz2 |
Attempt 2 at landing this patch. It broke the Mac/linux builds. Fix for now is
to add the offending code in np_v8object.cpp in a ifdef OS_WIN
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
R=jam
Review URL: http://codereview.chromium.org/6379
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/npapi/bindings/npruntime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/npapi/bindings/npruntime.h b/third_party/npapi/bindings/npruntime.h index f1160b7..74840ba 100644 --- a/third_party/npapi/bindings/npruntime.h +++ b/third_party/npapi/bindings/npruntime.h @@ -352,6 +352,23 @@ 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); |