OLD | NEW |
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 #include <string.h> |
6 | 7 |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 #include "content/child/npapi/plugin_web_event_converter_mac.h" | 9 #include "content/child/npapi/plugin_web_event_converter_mac.h" |
9 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
10 | 11 |
11 using blink::WebInputEvent; | 12 using blink::WebInputEvent; |
12 using blink::WebKeyboardEvent; | 13 using blink::WebKeyboardEvent; |
13 using blink::WebMouseEvent; | 14 using blink::WebMouseEvent; |
14 using blink::WebMouseWheelEvent; | 15 using blink::WebMouseWheelEvent; |
15 | 16 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (web_event.modifiers & WebInputEvent::AltKey) | 180 if (web_event.modifiers & WebInputEvent::AltKey) |
180 modifiers |= NSAlternateKeyMask; | 181 modifiers |= NSAlternateKeyMask; |
181 if (web_event.modifiers & WebInputEvent::MetaKey) | 182 if (web_event.modifiers & WebInputEvent::MetaKey) |
182 modifiers |= NSCommandKeyMask; | 183 modifiers |= NSCommandKeyMask; |
183 if (CapsLockIsActive(web_event)) | 184 if (CapsLockIsActive(web_event)) |
184 modifiers |= NSAlphaShiftKeyMask; | 185 modifiers |= NSAlphaShiftKeyMask; |
185 return modifiers; | 186 return modifiers; |
186 } | 187 } |
187 | 188 |
188 } // namespace content | 189 } // namespace content |
OLD | NEW |