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

Side by Side Diff: content/test/plugin/plugin_windowless_test.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #define STRSAFE_NO_DEPRECATE 5 #define STRSAFE_NO_DEPRECATE
6 6
7 #include "content/test/plugin/plugin_windowless_test.h" 7 #include "content/test/plugin/plugin_windowless_test.h"
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "content/test/plugin/plugin_client.h" 11 #include "content/test/plugin/plugin_client.h"
12 12
13 #if defined(TOOLKIT_GTK)
14 #include <gdk/gdkx.h>
15 #endif
16
17 // NPEvent does not exist on the Mac. 13 // NPEvent does not exist on the Mac.
18 #if defined(OS_MACOSX) 14 #if defined(OS_MACOSX)
19 typedef NPCocoaEvent WindowlessPluginTestEvent; 15 typedef NPCocoaEvent WindowlessPluginTestEvent;
20 #else 16 #else
21 typedef NPEvent WindowlessPluginTestEvent; 17 typedef NPEvent WindowlessPluginTestEvent;
22 #endif 18 #endif
23 19
24 namespace NPAPIClient { 20 namespace NPAPIClient {
25 21
26 namespace { 22 namespace {
27 23
28 // Remember the first plugin instance for tests involving multiple instances. 24 // Remember the first plugin instance for tests involving multiple instances.
29 WindowlessPluginTest* g_other_instance = NULL; 25 WindowlessPluginTest* g_other_instance = NULL;
30 26
31 void OnFinishTest(void* data) { 27 void OnFinishTest(void* data) {
32 static_cast<WindowlessPluginTest*>(data)->SignalTestCompleted(); 28 static_cast<WindowlessPluginTest*>(data)->SignalTestCompleted();
33 } 29 }
34 30
35 bool IsPaintEvent(WindowlessPluginTestEvent* np_event) { 31 bool IsPaintEvent(WindowlessPluginTestEvent* np_event) {
36 #if defined(OS_WIN) 32 #if defined(OS_WIN)
37 return np_event->event == WM_PAINT; 33 return np_event->event == WM_PAINT;
38 #elif defined(OS_MACOSX) 34 #elif defined(OS_MACOSX)
39 return np_event->type == NPCocoaEventDrawRect; 35 return np_event->type == NPCocoaEventDrawRect;
40 #elif defined(TOOLKIT_GTK)
41 return np_event->type == GraphicsExpose;
42 #else 36 #else
43 NOTIMPLEMENTED(); 37 NOTIMPLEMENTED();
44 return false; 38 return false;
45 #endif 39 #endif
46 } 40 }
47 41
48 bool IsMouseUpEvent(WindowlessPluginTestEvent* np_event) { 42 bool IsMouseUpEvent(WindowlessPluginTestEvent* np_event) {
49 #if defined(OS_WIN) 43 #if defined(OS_WIN)
50 return np_event->event == WM_LBUTTONUP; 44 return np_event->event == WM_LBUTTONUP;
51 #elif defined(OS_MACOSX) 45 #elif defined(OS_MACOSX)
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 error_string.append(StringForPoint(flipped_window_x, flipped_window_y)); 306 error_string.append(StringForPoint(flipped_window_x, flipped_window_y));
313 SetError(error_string); 307 SetError(error_string);
314 } 308 }
315 #else 309 #else
316 SetError("Unimplemented"); 310 SetError("Unimplemented");
317 #endif 311 #endif
318 SignalTestCompleted(); 312 SignalTestCompleted();
319 } 313 }
320 314
321 } // namespace NPAPIClient 315 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « content/test/plugin/plugin_javascript_open_popup.cc ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698