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

Side by Side 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, 7 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/plugins/test/plugin_windowed_test.h"
6 #include "webkit/glue/plugins/test/plugin_client.h"
7
8 namespace NPAPIClient {
9
10 WindowedPluginTest::WindowedPluginTest(NPP id, NPNetscapeFuncs *host_functions)
11 : PluginTest(id, host_functions) {
12 }
13
14 NPError WindowedPluginTest::SetWindow(NPWindow* pNPWindow) {
15 HWND window = reinterpret_cast<HWND>(pNPWindow->window);
16 if (!pNPWindow || !::IsWindow(window)) {
17 SetError("Invalid arguments passed in");
18 return NPERR_INVALID_PARAM;
19 }
20
21 if (test_name() == "hidden_plugin") {
22 NPIdentifier function_id;
23 if (IsWindowVisible(window)) {
24 function_id = HostFunctions()->getstringidentifier("windowVisible");
25 } else {
26 function_id = HostFunctions()->getstringidentifier("windowHidden");
27 }
28
29 NPVariant rv;
30 NPObject *window_obj = NULL;
31 HostFunctions()->getvalue(id(), NPNVWindowNPObject, &window_obj);
32 HostFunctions()->invoke(id(), window_obj, function_id, NULL, 0, &rv);
33 }
34
35 return NPERR_NO_ERROR;
36 }
37
38 } // namespace NPAPIClient
OLDNEW
« 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