diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-24 15:45:34 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-24 15:45:34 +0000 |
commit | 046009ed359d28f4d51360b9edd57dbd94cec979 (patch) | |
tree | 758b8515f02a3ccb664a754ff6f6903210210939 /webkit | |
parent | 65657bb54ca48c4a64c48061e215e96d0034d65c (diff) | |
download | chromium_src-046009ed359d28f4d51360b9edd57dbd94cec979.zip chromium_src-046009ed359d28f4d51360b9edd57dbd94cec979.tar.gz chromium_src-046009ed359d28f4d51360b9edd57dbd94cec979.tar.bz2 |
Added support for querying the NPNVSupportsWindowless value from NPN_GetValue.
Safari and Firefox support this. I have seen windowless flash instances query this
in NPP_New. Added a UI test for this in an existing windowless plugin UI test.
R=jam
Review URL: http://codereview.chromium.org/8134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 7 | ||||
-rw-r--r-- | webkit/glue/plugins/test/plugin_execute_script_delete_test.cc | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 66750ac..12e6330 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -741,6 +741,13 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void *value) { rv = NPERR_NO_ERROR; break; } + case NPNVSupportsWindowless: + { + NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); + *supports_windowless = TRUE; + rv = NPERR_NO_ERROR; + break; + } case default_plugin::kMissingPluginStatusStart + default_plugin::MISSING_PLUGIN_AVAILABLE: // fall through diff --git a/webkit/glue/plugins/test/plugin_execute_script_delete_test.cc b/webkit/glue/plugins/test/plugin_execute_script_delete_test.cc index cb8a025..7137ceb 100644 --- a/webkit/glue/plugins/test/plugin_execute_script_delete_test.cc +++ b/webkit/glue/plugins/test/plugin_execute_script_delete_test.cc @@ -16,9 +16,17 @@ int16 ExecuteScriptDeleteTest::HandleEvent(void* event) { NPEvent* np_event = reinterpret_cast<NPEvent*>(event); if (WM_PAINT == np_event->event ) { NPNetscapeFuncs* browser = NPAPIClient::PluginClient::HostFunctions(); - NPUTF8* urlString = "javascript:DeletePluginWithinScript()"; - NPUTF8* targetString = NULL; - browser->geturl(id(), urlString, targetString); + + NPBool supports_windowless = 0; + NPError result = browser->getvalue(id(), NPNVSupportsWindowless, + &supports_windowless); + if ((result != NPERR_NO_ERROR) || (supports_windowless != TRUE)) { + SetError("Failed to read NPNVSupportsWindowless value"); + } else { + NPUTF8* urlString = "javascript:DeletePluginWithinScript()"; + NPUTF8* targetString = NULL; + browser->geturl(id(), urlString, targetString); + } SignalTestCompleted(); } // If this test failed, then we'd have crashed by now. |