| 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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 // Owns a platform specific event; used to pass own and pass event through | 25 // Owns a platform specific event; used to pass own and pass event through |
| 26 // platform independent code. | 26 // platform independent code. |
| 27 struct CONTENT_EXPORT NativeWebKeyboardEvent : | 27 struct CONTENT_EXPORT NativeWebKeyboardEvent : |
| 28 NON_EXPORTED_BASE(public blink::WebKeyboardEvent) { | 28 NON_EXPORTED_BASE(public blink::WebKeyboardEvent) { |
| 29 NativeWebKeyboardEvent(); | 29 NativeWebKeyboardEvent(); |
| 30 | 30 |
| 31 explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event); | 31 explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event); |
| 32 #if defined(OS_ANDROID) | 32 #if defined(OS_ANDROID) |
| 33 NativeWebKeyboardEvent(blink::WebInputEvent::Type type, | 33 // Holds a global ref to android_key_event (allowed to be null). |
| 34 int modifiers, | |
| 35 double time_secs, | |
| 36 int keycode, | |
| 37 int scancode, | |
| 38 int unicode_character, | |
| 39 bool is_system_key); | |
| 40 // Takes ownership of android_key_event. | |
| 41 NativeWebKeyboardEvent( | 34 NativeWebKeyboardEvent( |
| 42 JNIEnv* env, | 35 JNIEnv* env, |
| 43 const base::android::JavaRef<jobject>& android_key_event, | 36 const base::android::JavaRef<jobject>& android_key_event, |
| 44 blink::WebInputEvent::Type type, | 37 blink::WebInputEvent::Type type, |
| 45 int modifiers, | 38 int modifiers, |
| 46 double time_secs, | 39 double time_secs, |
| 47 int keycode, | 40 int keycode, |
| 48 int scancode, | 41 int scancode, |
| 49 int unicode_character, | 42 int unicode_character, |
| 50 bool is_system_key); | 43 bool is_system_key); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 67 // renderer. This happens for RawKeyDown events that are created while IME is | 60 // renderer. This happens for RawKeyDown events that are created while IME is |
| 68 // active and is necessary to prevent backspace from doing "history back" if | 61 // active and is necessary to prevent backspace from doing "history back" if |
| 69 // it is hit in ime mode. | 62 // it is hit in ime mode. |
| 70 // Currently, it's only used by Linux and Mac ports. | 63 // Currently, it's only used by Linux and Mac ports. |
| 71 bool skip_in_browser; | 64 bool skip_in_browser; |
| 72 }; | 65 }; |
| 73 | 66 |
| 74 } // namespace content | 67 } // namespace content |
| 75 | 68 |
| 76 #endif // CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ | 69 #endif // CONTENT_PUBLIC_BROWSER_NATIVE_WEB_KEYBOARD_EVENT_H_ |
| OLD | NEW |