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 #include "content/public/browser/native_web_keyboard_event.h" | 5 #include "content/public/browser/native_web_keyboard_event.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" | 8 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 NativeWebKeyboardEvent::NativeWebKeyboardEvent() | 27 NativeWebKeyboardEvent::NativeWebKeyboardEvent() |
28 : os_event(NULL), | 28 : os_event(NULL), |
29 skip_in_browser(false) { | 29 skip_in_browser(false) { |
30 } | 30 } |
31 | 31 |
32 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | 32 NativeWebKeyboardEvent::NativeWebKeyboardEvent( |
33 WebKit::WebInputEvent::Type type, | 33 blink::WebInputEvent::Type type, |
34 int modifiers, double time_secs, int keycode, int unicode_character, | 34 int modifiers, double time_secs, int keycode, int unicode_character, |
35 bool is_system_key) | 35 bool is_system_key) |
36 : WebKeyboardEvent(WebKeyboardEventBuilder::Build( | 36 : WebKeyboardEvent(WebKeyboardEventBuilder::Build( |
37 type, modifiers, time_secs, keycode, unicode_character, | 37 type, modifiers, time_secs, keycode, unicode_character, |
38 is_system_key)) { | 38 is_system_key)) { |
39 os_event = NULL; | 39 os_event = NULL; |
40 skip_in_browser = false; | 40 skip_in_browser = false; |
41 } | 41 } |
42 | 42 |
43 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | 43 NativeWebKeyboardEvent::NativeWebKeyboardEvent( |
44 jobject android_key_event, WebKit::WebInputEvent::Type type, | 44 jobject android_key_event, blink::WebInputEvent::Type type, |
45 int modifiers, double time_secs, int keycode, int unicode_character, | 45 int modifiers, double time_secs, int keycode, int unicode_character, |
46 bool is_system_key) | 46 bool is_system_key) |
47 : WebKeyboardEvent(WebKeyboardEventBuilder::Build( | 47 : WebKeyboardEvent(WebKeyboardEventBuilder::Build( |
48 type, modifiers, time_secs, keycode, unicode_character, | 48 type, modifiers, time_secs, keycode, unicode_character, |
49 is_system_key)) { | 49 is_system_key)) { |
50 os_event = NewGlobalRefForKeyEvent(android_key_event); | 50 os_event = NewGlobalRefForKeyEvent(android_key_event); |
51 skip_in_browser = false; | 51 skip_in_browser = false; |
52 } | 52 } |
53 | 53 |
54 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | 54 NativeWebKeyboardEvent::NativeWebKeyboardEvent( |
(...skipping 11 matching lines...) Expand all Loading... |
66 skip_in_browser = other.skip_in_browser; | 66 skip_in_browser = other.skip_in_browser; |
67 | 67 |
68 return *this; | 68 return *this; |
69 } | 69 } |
70 | 70 |
71 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | 71 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { |
72 DeleteGlobalRefForKeyEvent(os_event); | 72 DeleteGlobalRefForKeyEvent(os_event); |
73 } | 73 } |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
OLD | NEW |