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

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: 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..4f15eab34d8255fe7dcf695acbfb519d70bff5bf
--- /dev/null
+++ b/content/browser/renderer_host/ime_adapter_android.h
@@ -0,0 +1,46 @@
+// 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 {
+class RenderWidgetHostViewAndroid;
+struct NativeWebKeyboardEvent;
+}
+
+// This class has a similar role as gtk_im_context_wrapper:
+// it sits in between android IME and RenderWidgetHostViewAndroid, and manages
+// input handling for text boxes and password fields.
+//
+// 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.
+//
+// This class is used solely by RenderWidgetHostViewAndroid.
+// 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.
+class ImeAdapterAndroid {
qinmin 2012/07/31 19:22:48 add content namespace here
aurimas (slooooooooow) 2012/07/31 21:12:14 Done.
+ public:
+ 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.
+ ~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:
+ content::RenderWidgetHostViewAndroid* rwhva_;
qinmin 2012/07/31 19:22:48 ditto
aurimas (slooooooooow) 2012/07/31 21:12:14 Done.
+ jobject java_ime_adapter_;
+};
+
+bool RegisterImeAdapter(JNIEnv* env);
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698