Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Unified Diff: content/browser/renderer_host/ime_adapter_android.h

Issue 10828098: Upstreaming Select Action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oli's and Min's nits fixed Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698