| 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/browser/renderer_host/ime_adapter_android.h" | 5 #include "content/browser/renderer_host/ime_adapter_android.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <android/input.h> | 8 #include <android/input.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/browser/renderer_host/render_view_host_impl.h" | 22 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 23 #include "content/browser/renderer_host/render_widget_host_impl.h" | 23 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 24 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 24 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 25 #include "content/common/input_messages.h" | 25 #include "content/common/input_messages.h" |
| 26 #include "content/common/view_messages.h" | 26 #include "content/common/view_messages.h" |
| 27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 28 #include "content/public/browser/native_web_keyboard_event.h" | 28 #include "content/public/browser/native_web_keyboard_event.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "content/public/common/content_features.h" | 30 #include "content/public/common/content_features.h" |
| 31 #include "jni/ImeAdapter_jni.h" | 31 #include "jni/ImeAdapter_jni.h" |
| 32 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 33 #include "third_party/WebKit/public/platform/WebTextInputType.h" |
| 32 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 34 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 33 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
| 34 #include "third_party/WebKit/public/web/WebTextInputType.h" | |
| 35 | 35 |
| 36 using base::android::AttachCurrentThread; | 36 using base::android::AttachCurrentThread; |
| 37 using base::android::ConvertJavaStringToUTF16; | 37 using base::android::ConvertJavaStringToUTF16; |
| 38 using base::android::JavaParamRef; | 38 using base::android::JavaParamRef; |
| 39 | 39 |
| 40 namespace content { | 40 namespace content { |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 // Maps a java KeyEvent into a NativeWebKeyboardEvent. | 43 // Maps a java KeyEvent into a NativeWebKeyboardEvent. |
| 44 // |java_key_event| is used to maintain a globalref for KeyEvent. | 44 // |java_key_event| is used to maintain a globalref for KeyEvent. |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 367 } |
| 368 | 368 |
| 369 WebContents* ImeAdapterAndroid::GetWebContents() { | 369 WebContents* ImeAdapterAndroid::GetWebContents() { |
| 370 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); | 370 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); |
| 371 if (!rwh) | 371 if (!rwh) |
| 372 return nullptr; | 372 return nullptr; |
| 373 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); | 373 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace content | 376 } // namespace content |
| OLD | NEW |