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

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: Brett'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
« no previous file with comments | « no previous file | content/browser/renderer_host/ime_adapter_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..768e9d80ea83a1d4fb42143b0885b563b5ef68ed
--- /dev/null
+++ b/content/browser/renderer_host/ime_adapter_android.h
@@ -0,0 +1,41 @@
+// 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 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();
+
+ static bool RegisterImeAdapter(JNIEnv* env);
+
+ // 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_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/ime_adapter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698