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

Side by Side Diff: webkit/glue/plugins/plugin_web_event_converter_mac.mm

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/plugins/npapi/plugin_web_event_converter_mac.h" 8 #include "webkit/glue/plugins/plugin_web_event_converter_mac.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
10 10
11 using WebKit::WebInputEvent; 11 using WebKit::WebInputEvent;
12 using WebKit::WebKeyboardEvent; 12 using WebKit::WebKeyboardEvent;
13 using WebKit::WebMouseEvent; 13 using WebKit::WebMouseEvent;
14 using WebKit::WebMouseWheelEvent; 14 using WebKit::WebMouseWheelEvent;
15 15
16 namespace webkit {
17 namespace npapi {
18
19 namespace { 16 namespace {
20 17
21 // Returns true if the caps lock flag should be set for the given event. 18 // Returns true if the caps lock flag should be set for the given event.
22 bool CapsLockIsActive(const WebInputEvent& event) { 19 bool CapsLockIsActive(const WebInputEvent& event) {
23 // Only key events have accurate information for the caps lock flag; see 20 // Only key events have accurate information for the caps lock flag; see
24 // <https://bugs.webkit.org/show_bug.cgi?id=46518>. 21 // <https://bugs.webkit.org/show_bug.cgi?id=46518>.
25 // For other types, use the live state. 22 // For other types, use the live state.
26 if (WebInputEvent::isKeyboardEventType(event.type)) 23 if (WebInputEvent::isKeyboardEventType(event.type))
27 return (event.modifiers & WebInputEvent::CapsLockOn) != 0; 24 return (event.modifiers & WebInputEvent::CapsLockOn) != 0;
28 else 25 else
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 return new CocoaPluginWebEventConverter(); 350 return new CocoaPluginWebEventConverter();
354 #ifndef NP_NO_CARBON 351 #ifndef NP_NO_CARBON
355 case NPEventModelCarbon: 352 case NPEventModelCarbon:
356 return new CarbonPluginWebEventConverter(); 353 return new CarbonPluginWebEventConverter();
357 #endif 354 #endif
358 default: 355 default:
359 NOTIMPLEMENTED(); 356 NOTIMPLEMENTED();
360 return NULL; 357 return NULL;
361 } 358 }
362 } 359 }
363
364 } // namespace npapi
365 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_web_event_converter_mac.h ('k') | webkit/glue/plugins/quickdraw_drawing_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698