OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "webkit/glue/plugins/test/plugin_javascript_open_popup.h" | 6 #include "webkit/glue/plugins/test/plugin_javascript_open_popup.h" |
7 | 7 |
8 #if defined(OS_LINUX) | 8 #if defined(USE_X11) |
9 #include "third_party/npapi/bindings/npapi_x11.h" | 9 #include "third_party/npapi/bindings/npapi_x11.h" |
10 #endif | 10 #endif |
11 #include "webkit/glue/plugins/test/plugin_client.h" | 11 #include "webkit/glue/plugins/test/plugin_client.h" |
12 | 12 |
13 namespace NPAPIClient { | 13 namespace NPAPIClient { |
14 | 14 |
15 ExecuteJavascriptOpenPopupWithPluginTest:: | 15 ExecuteJavascriptOpenPopupWithPluginTest:: |
16 ExecuteJavascriptOpenPopupWithPluginTest(NPP id, | 16 ExecuteJavascriptOpenPopupWithPluginTest(NPP id, |
17 NPNetscapeFuncs *host_functions) | 17 NPNetscapeFuncs *host_functions) |
18 : PluginTest(id, host_functions), | 18 : PluginTest(id, host_functions), |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 if (IsWindow(window_handle)) { | 56 if (IsWindow(window_handle)) { |
57 HWND parent_window = GetParent(window_handle); | 57 HWND parent_window = GetParent(window_handle); |
58 if (!IsWindow(parent_window) || parent_window == GetDesktopWindow()) | 58 if (!IsWindow(parent_window) || parent_window == GetDesktopWindow()) |
59 SetError("Windowed plugin instantiated with NULL parent"); | 59 SetError("Windowed plugin instantiated with NULL parent"); |
60 return true; | 60 return true; |
61 } | 61 } |
62 | 62 |
63 return false; | 63 return false; |
64 } | 64 } |
65 | 65 |
66 #elif defined(OS_LINUX) | 66 #elif defined(USE_X11) |
67 // This code blindly follows the same sorts of verifications done on | 67 // This code blindly follows the same sorts of verifications done on |
68 // the Windows side. Does it make sense on X? Maybe not really, but | 68 // the Windows side. Does it make sense on X? Maybe not really, but |
69 // it can't hurt to do extra validations. | 69 // it can't hurt to do extra validations. |
70 bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( | 70 bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( |
71 NPWindow* window) { | 71 NPWindow* window) { |
72 Window xwindow = reinterpret_cast<Window>(window->window); | 72 Window xwindow = reinterpret_cast<Window>(window->window); |
73 // Grab a pointer to the extra SetWindow data so we can grab the display out. | 73 // Grab a pointer to the extra SetWindow data so we can grab the display out. |
74 NPSetWindowCallbackStruct* extra = | 74 NPSetWindowCallbackStruct* extra = |
75 static_cast<NPSetWindowCallbackStruct*>(window->ws_info); | 75 static_cast<NPSetWindowCallbackStruct*>(window->ws_info); |
76 | 76 |
(...skipping 11 matching lines...) Expand all Loading... |
88 } | 88 } |
89 #elif defined(OS_MACOSX) | 89 #elif defined(OS_MACOSX) |
90 bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( | 90 bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( |
91 NPWindow* window) { | 91 NPWindow* window) { |
92 // TODO(port) scaffolding--replace with a real test once NPWindow is done. | 92 // TODO(port) scaffolding--replace with a real test once NPWindow is done. |
93 return false; | 93 return false; |
94 } | 94 } |
95 #endif | 95 #endif |
96 | 96 |
97 } // namespace NPAPIClient | 97 } // namespace NPAPIClient |
OLD | NEW |