Index: content/browser/renderer_host/ime_adapter_android.h |
diff --git a/content/browser/renderer_host/ime_adapter_android.h b/content/browser/renderer_host/ime_adapter_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..304a5267fd3868dd2f0fe43b96d0665e7b60913e |
--- /dev/null |
+++ b/content/browser/renderer_host/ime_adapter_android.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
+ |
+#include <jni.h> |
+ |
+namespace content { |
brettw
2012/07/31 21:41:53
Blank line after this.
aurimas (slooooooooow)
2012/07/31 21:58:38
Done.
|
+class RenderWidgetHostViewAndroid; |
+struct NativeWebKeyboardEvent; |
+ |
+// This class is in charge of dispatching key events from the java side |
+// and forward to renderer along with input method results via |
+// corresponding host view. |
+class ImeAdapterAndroid { |
+ public: |
+ explicit ImeAdapterAndroid(RenderWidgetHostViewAndroid* rwhva); |
+ ~ImeAdapterAndroid(); |
+ |
+ // Called from java -> native |
+ // The java side is responsible to translate android KeyEvent various enums |
+ // and values into the corresponding WebKit::WebInputEvent. |
+ void Unselect(JNIEnv*, jobject); |
+ void SelectAll(JNIEnv*, jobject); |
+ void Cut(JNIEnv*, jobject); |
+ void Copy(JNIEnv*, jobject); |
+ void Paste(JNIEnv*, jobject); |
+ |
+ private: |
+ RenderWidgetHostViewAndroid* rwhva_; |
+ jobject java_ime_adapter_; |
+}; |
+ |
+bool RegisterImeAdapter(JNIEnv* env); |
brettw
2012/07/31 21:41:53
Why not have this as a static function in the clas
aurimas (slooooooooow)
2012/07/31 21:58:38
Done.
|
+ |
+} // namespace content |
brettw
2012/07/31 21:41:53
Two spaces before end-of-line comment.
aurimas (slooooooooow)
2012/07/31 21:58:38
Done.
|
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |