OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | |
7 | |
8 #include <jni.h> | |
9 | |
10 namespace content { | |
11 class RenderWidgetHostViewAndroid; | |
12 struct NativeWebKeyboardEvent; | |
13 } | |
14 | |
15 // This class has a similar role as gtk_im_context_wrapper: | |
16 // it sits in between android IME and RenderWidgetHostViewAndroid, and manages | |
17 // input handling for text boxes and password fields. | |
18 // | |
19 // This class is in charge of dispatching key events from the java side | |
20 // and forward to renderer along with input method results via | |
21 // corresponding host view. | |
22 // | |
23 // This class is used solely by RenderWidgetHostViewAndroid. | |
24 // For more information, see http://b/issue?id=3248163 | |
olilan
2012/07/31 18:24:08
For what you've added in this CL this isn't really
aurimas (slooooooooow)
2012/07/31 21:12:14
Done.
| |
25 class ImeAdapterAndroid { | |
qinmin
2012/07/31 19:22:48
add content namespace here
aurimas (slooooooooow)
2012/07/31 21:12:14
Done.
| |
26 public: | |
27 explicit ImeAdapterAndroid(content::RenderWidgetHostViewAndroid* rwhva); | |
qinmin
2012/07/31 19:22:48
no content:: if ImeAdapterAndroid is in content na
aurimas (slooooooooow)
2012/07/31 21:12:14
Done.
| |
28 ~ImeAdapterAndroid(); | |
29 | |
30 // Called from java -> native | |
31 // The java side is responsible to translate android KeyEvent various enums | |
32 // and values into the corresponding WebKit::WebInputEvent. | |
33 void Unselect(JNIEnv*, jobject); | |
34 void SelectAll(JNIEnv*, jobject); | |
35 void Cut(JNIEnv*, jobject); | |
36 void Copy(JNIEnv*, jobject); | |
37 void Paste(JNIEnv*, jobject); | |
38 | |
39 private: | |
40 content::RenderWidgetHostViewAndroid* rwhva_; | |
qinmin
2012/07/31 19:22:48
ditto
aurimas (slooooooooow)
2012/07/31 21:12:14
Done.
| |
41 jobject java_ime_adapter_; | |
42 }; | |
43 | |
44 bool RegisterImeAdapter(JNIEnv* env); | |
45 | |
46 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | |
OLD | NEW |