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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java

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/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
new file mode 100644
index 0000000000000000000000000000000000000000..2904ea46e5588c8120cb23c388f9f8fd8e96c3da
--- /dev/null
+++ b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
@@ -0,0 +1,68 @@
+// 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.
+
+package org.chromium.content.browser;
+
+import org.chromium.base.CalledByNative;
+import org.chromium.base.JNINamespace;
+import org.chromium.content.app.AppResource;
+
+@JNINamespace("content")
+class ImeAdapter {
+
+ private int mNativeImeAdapterAndroid;
+ private int mTextInputType;
+
+ @CalledByNative
+ void detach() {
+ mNativeImeAdapterAndroid = 0;
+ mTextInputType = 0;
+ }
+
+ boolean unselect() {
+ if (mNativeImeAdapterAndroid == 0) {
+ return false;
+ }
+ nativeUnselect(mNativeImeAdapterAndroid);
+ return true;
+ }
+
+ boolean selectAll() {
+ if (mNativeImeAdapterAndroid == 0) {
+ return false;
+ }
+ nativeSelectAll(mNativeImeAdapterAndroid);
+ return true;
+ }
+
+ boolean cut() {
+ if (mNativeImeAdapterAndroid == 0) {
+ return false;
+ }
+ nativeCut(mNativeImeAdapterAndroid);
+ return true;
+ }
+
+ boolean copy() {
+ if (mNativeImeAdapterAndroid == 0) {
+ return false;
+ }
+ nativeCopy(mNativeImeAdapterAndroid);
+ return true;
+ }
+
+ boolean paste() {
+ if (mNativeImeAdapterAndroid == 0) {
+ return false;
+ }
+ nativePaste(mNativeImeAdapterAndroid);
+ return true;
+ }
+
+ private native void nativeUnselect(int nativeImeAdapterAndroid);
+ private native void nativeSelectAll(int nativeImeAdapterAndroid);
+ private native void nativeCut(int nativeImeAdapterAndroid);
+ private native void nativeCopy(int nativeImeAdapterAndroid);
+ private native void nativePaste(int nativeImeAdapterAndroid);
+}

Powered by Google App Engine
This is Rietveld 408576698