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 #ifndef CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 struct CONTENT_EXPORT NativeWebKeyboardEvent : | 24 struct CONTENT_EXPORT NativeWebKeyboardEvent : |
25 NON_EXPORTED_BASE(public blink::WebKeyboardEvent) { | 25 NON_EXPORTED_BASE(public blink::WebKeyboardEvent) { |
26 NativeWebKeyboardEvent(); | 26 NativeWebKeyboardEvent(); |
27 | 27 |
28 explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event); | 28 explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event); |
29 #if defined(OS_ANDROID) | 29 #if defined(OS_ANDROID) |
30 NativeWebKeyboardEvent(blink::WebInputEvent::Type type, | 30 NativeWebKeyboardEvent(blink::WebInputEvent::Type type, |
31 int modifiers, | 31 int modifiers, |
32 double time_secs, | 32 double time_secs, |
33 int keycode, | 33 int keycode, |
| 34 int scancode, |
34 int unicode_character, | 35 int unicode_character, |
35 bool is_system_key); | 36 bool is_system_key); |
36 // Takes ownership of android_key_event. | 37 // Takes ownership of android_key_event. |
37 NativeWebKeyboardEvent(jobject android_key_event, | 38 NativeWebKeyboardEvent(jobject android_key_event, |
38 blink::WebInputEvent::Type type, | 39 blink::WebInputEvent::Type type, |
39 int modifiers, | 40 int modifiers, |
40 double time_secs, | 41 double time_secs, |
41 int keycode, | 42 int keycode, |
| 43 int scancode, |
42 int unicode_character, | 44 int unicode_character, |
43 bool is_system_key); | 45 bool is_system_key); |
44 #else | 46 #else |
45 explicit NativeWebKeyboardEvent(const ui::KeyEvent& key_event); | 47 explicit NativeWebKeyboardEvent(const ui::KeyEvent& key_event); |
46 #if defined(USE_AURA) | 48 #if defined(USE_AURA) |
47 NativeWebKeyboardEvent(ui::EventType type, | 49 NativeWebKeyboardEvent(ui::EventType type, |
48 bool is_char, | 50 bool is_char, |
49 wchar_t character, | 51 wchar_t character, |
50 int state, | 52 int state, |
51 double time_stamp_seconds); | 53 double time_stamp_seconds); |
(...skipping 18 matching lines...) Expand all Loading... |
70 // True if the key event matches an edit command. In order to ensure the edit | 72 // True if the key event matches an edit command. In order to ensure the edit |
71 // command always work in web page, the browser should not pre-handle this key | 73 // command always work in web page, the browser should not pre-handle this key |
72 // event as a reserved accelerator. See http://crbug.com/54573 | 74 // event as a reserved accelerator. See http://crbug.com/54573 |
73 bool match_edit_command; | 75 bool match_edit_command; |
74 #endif | 76 #endif |
75 }; | 77 }; |
76 | 78 |
77 } // namespace content | 79 } // namespace content |
78 | 80 |
79 #endif // CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ | 81 #endif // CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ |
OLD | NEW |