OLD | NEW |
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 #include "chrome/common/native_web_keyboard_event_views.h" | 5 #include "chrome/common/native_web_keyboard_event_views.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "views/events/event.h" | 12 #include "ui/views/events/event.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 int ViewsFlagsToWebInputEventModifiers(int flags) { | 16 int ViewsFlagsToWebInputEventModifiers(int flags) { |
17 return | 17 return |
18 (flags & ui::EF_SHIFT_DOWN ? WebKit::WebInputEvent::ShiftKey : 0) | | 18 (flags & ui::EF_SHIFT_DOWN ? WebKit::WebInputEvent::ShiftKey : 0) | |
19 (flags & ui::EF_CONTROL_DOWN ? WebKit::WebInputEvent::ControlKey : 0) | | 19 (flags & ui::EF_CONTROL_DOWN ? WebKit::WebInputEvent::ControlKey : 0) | |
20 (flags & ui::EF_CAPS_LOCK_DOWN ? WebKit::WebInputEvent::CapsLockOn : 0) | | 20 (flags & ui::EF_CAPS_LOCK_DOWN ? WebKit::WebInputEvent::CapsLockOn : 0) | |
21 (flags & ui::EF_ALT_DOWN ? WebKit::WebInputEvent::AltKey : 0); | 21 (flags & ui::EF_ALT_DOWN ? WebKit::WebInputEvent::AltKey : 0); |
22 } | 22 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 os_event = NULL; | 84 os_event = NULL; |
85 #endif | 85 #endif |
86 | 86 |
87 #if defined(TOOLKIT_USES_GTK) | 87 #if defined(TOOLKIT_USES_GTK) |
88 match_edit_command = false; | 88 match_edit_command = false; |
89 #endif | 89 #endif |
90 } | 90 } |
91 | 91 |
92 NativeWebKeyboardEventViews::~NativeWebKeyboardEventViews() { | 92 NativeWebKeyboardEventViews::~NativeWebKeyboardEventViews() { |
93 } | 93 } |
OLD | NEW |