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

Side by Side Diff: webkit/plugins/npapi/test/plugin_windowless_test.cc

Issue 6902069: Increase warning level to 4 on Visual Studio (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed remaining issues Created 9 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 | « views/view_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/string_number_conversions.h" 6 #include "base/string_number_conversions.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "webkit/plugins/npapi/test/plugin_windowless_test.h" 8 #include "webkit/plugins/npapi/test/plugin_windowless_test.h"
9 #include "webkit/plugins/npapi/test/plugin_client.h" 9 #include "webkit/plugins/npapi/test/plugin_client.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 static bool IsMouseUpEvent(NPEvent* np_event) { 44 static bool IsMouseUpEvent(NPEvent* np_event) {
45 #if defined(OS_WIN) 45 #if defined(OS_WIN)
46 return WM_LBUTTONUP == np_event->event; 46 return WM_LBUTTONUP == np_event->event;
47 #elif defined(OS_MACOSX) 47 #elif defined(OS_MACOSX)
48 return np_event->what == mouseUp; 48 return np_event->what == mouseUp;
49 #endif 49 #endif
50 } 50 }
51 51
52 #if defined(OS_MACOSX)
52 static bool IsWindowActivationEvent(NPEvent* np_event) { 53 static bool IsWindowActivationEvent(NPEvent* np_event) {
53 #if defined(OS_WIN)
54 NOTIMPLEMENTED();
55 return false;
56 #elif defined(OS_MACOSX)
57 return np_event->what == activateEvt; 54 return np_event->what == activateEvt;
55 }
58 #endif 56 #endif
59 }
60 57
61 bool WindowlessPluginTest::IsWindowless() const { 58 bool WindowlessPluginTest::IsWindowless() const {
62 return true; 59 return true;
63 } 60 }
64 61
65 int16 WindowlessPluginTest::HandleEvent(void* event) { 62 int16 WindowlessPluginTest::HandleEvent(void* event) {
66 63
67 NPNetscapeFuncs* browser = NPAPIClient::PluginClient::HostFunctions(); 64 NPNetscapeFuncs* browser = NPAPIClient::PluginClient::HostFunctions();
68 65
69 NPBool supports_windowless = 0; 66 NPBool supports_windowless = 0;
(...skipping 24 matching lines...) Expand all
94 } 91 }
95 92
96 DeleteObject(clipping_region); 93 DeleteObject(clipping_region);
97 #endif 94 #endif
98 95
99 if (test_name() == "execute_script_delete_in_paint") { 96 if (test_name() == "execute_script_delete_in_paint") {
100 ExecuteScriptDeleteInPaint(browser); 97 ExecuteScriptDeleteInPaint(browser);
101 } else if (test_name() == "multiple_instances_sync_calls") { 98 } else if (test_name() == "multiple_instances_sync_calls") {
102 MultipleInstanceSyncCalls(browser); 99 MultipleInstanceSyncCalls(browser);
103 } 100 }
104 #if OS_MACOSX 101 #if defined(OS_MACOSX)
105 } else if (IsWindowActivationEvent(np_event) && 102 } else if (IsWindowActivationEvent(np_event) &&
106 test_name() == "convert_point") { 103 test_name() == "convert_point") {
107 ConvertPoint(browser); 104 ConvertPoint(browser);
108 #endif 105 #endif
109 } else if (IsMouseMoveEvent(np_event) && 106 } else if (IsMouseMoveEvent(np_event) &&
110 test_name() == "execute_script_delete_in_mouse_move") { 107 test_name() == "execute_script_delete_in_mouse_move") {
111 ExecuteScript(browser, id(), "DeletePluginWithinScript();", NULL); 108 ExecuteScript(browser, id(), "DeletePluginWithinScript();", NULL);
112 SignalTestCompleted(); 109 SignalTestCompleted();
113 } else if (IsMouseUpEvent(np_event) && 110 } else if (IsMouseUpEvent(np_event) &&
114 test_name() == "delete_frame_test") { 111 test_name() == "delete_frame_test") {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 error_string.append(StringForPoint(flipped_window_x, flipped_window_y)); 253 error_string.append(StringForPoint(flipped_window_x, flipped_window_y));
257 SetError(error_string); 254 SetError(error_string);
258 } 255 }
259 #else 256 #else
260 SetError("Unimplemented"); 257 SetError("Unimplemented");
261 #endif 258 #endif
262 SignalTestCompleted(); 259 SignalTestCompleted();
263 } 260 }
264 261
265 } // namespace NPAPIClient 262 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « views/view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698