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

Side by Side Diff: content/child/npapi/plugin_web_event_converter_mac.mm

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/child/npapi/plugin_web_event_converter_mac.h" 8 #include "content/child/npapi/plugin_web_event_converter_mac.h"
9 #include "third_party/WebKit/public/web/WebInputEvent.h" 9 #include "third_party/WebKit/public/web/WebInputEvent.h"
10 10
11 using WebKit::WebInputEvent; 11 using blink::WebInputEvent;
12 using WebKit::WebKeyboardEvent; 12 using blink::WebKeyboardEvent;
13 using WebKit::WebMouseEvent; 13 using blink::WebMouseEvent;
14 using WebKit::WebMouseWheelEvent; 14 using blink::WebMouseWheelEvent;
15 15
16 namespace content { 16 namespace content {
17 17
18 namespace { 18 namespace {
19 19
20 // Returns true if the given key is a modifier key. 20 // Returns true if the given key is a modifier key.
21 bool KeyIsModifier(int native_key_code) { 21 bool KeyIsModifier(int native_key_code) {
22 switch (native_key_code) { 22 switch (native_key_code) {
23 case 55: // Left command 23 case 55: // Left command
24 case 54: // Right command 24 case 54: // Right command
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (web_event.modifiers & WebInputEvent::AltKey) 179 if (web_event.modifiers & WebInputEvent::AltKey)
180 modifiers |= NSAlternateKeyMask; 180 modifiers |= NSAlternateKeyMask;
181 if (web_event.modifiers & WebInputEvent::MetaKey) 181 if (web_event.modifiers & WebInputEvent::MetaKey)
182 modifiers |= NSCommandKeyMask; 182 modifiers |= NSCommandKeyMask;
183 if (CapsLockIsActive(web_event)) 183 if (CapsLockIsActive(web_event))
184 modifiers |= NSAlphaShiftKeyMask; 184 modifiers |= NSAlphaShiftKeyMask;
185 return modifiers; 185 return modifiers;
186 } 186 }
187 187
188 } // namespace content 188 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/plugin_web_event_converter_mac.h ('k') | content/child/npapi/webplugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698