Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: webkit/glue/plugins/test/plugin_windowed_test.cc

Issue 106008: Fix Flash window in Analytics being incorrectly visible.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/test/plugin_windowed_test.h ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/test/plugin_windowed_test.cc
===================================================================
--- webkit/glue/plugins/test/plugin_windowed_test.cc (revision 0)
+++ webkit/glue/plugins/test/plugin_windowed_test.cc (revision 0)
@@ -0,0 +1,38 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/glue/plugins/test/plugin_windowed_test.h"
+#include "webkit/glue/plugins/test/plugin_client.h"
+
+namespace NPAPIClient {
+
+WindowedPluginTest::WindowedPluginTest(NPP id, NPNetscapeFuncs *host_functions)
+ : PluginTest(id, host_functions) {
+}
+
+NPError WindowedPluginTest::SetWindow(NPWindow* pNPWindow) {
+ HWND window = reinterpret_cast<HWND>(pNPWindow->window);
+ if (!pNPWindow || !::IsWindow(window)) {
+ SetError("Invalid arguments passed in");
+ return NPERR_INVALID_PARAM;
+ }
+
+ if (test_name() == "hidden_plugin") {
+ NPIdentifier function_id;
+ if (IsWindowVisible(window)) {
+ function_id = HostFunctions()->getstringidentifier("windowVisible");
+ } else {
+ function_id = HostFunctions()->getstringidentifier("windowHidden");
+ }
+
+ NPVariant rv;
+ NPObject *window_obj = NULL;
+ HostFunctions()->getvalue(id(), NPNVWindowNPObject, &window_obj);
+ HostFunctions()->invoke(id(), window_obj, function_id, NULL, 0, &rv);
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+} // namespace NPAPIClient
« no previous file with comments | « webkit/glue/plugins/test/plugin_windowed_test.h ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698