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

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

Issue 11360207: Add Java resources to content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Handler; 8 import android.os.Handler;
9 import android.os.ResultReceiver; 9 import android.os.ResultReceiver;
10 import android.text.Editable; 10 import android.text.Editable;
11 import android.text.InputType; 11 import android.text.InputType;
12 import android.text.Selection; 12 import android.text.Selection;
13 import android.view.KeyEvent; 13 import android.view.KeyEvent;
14 import android.view.View; 14 import android.view.View;
15 import android.view.inputmethod.BaseInputConnection; 15 import android.view.inputmethod.BaseInputConnection;
16 import android.view.inputmethod.EditorInfo; 16 import android.view.inputmethod.EditorInfo;
17 import android.view.inputmethod.ExtractedText; 17 import android.view.inputmethod.ExtractedText;
18 import android.view.inputmethod.ExtractedTextRequest; 18 import android.view.inputmethod.ExtractedTextRequest;
19 import android.view.inputmethod.InputMethodManager; 19 import android.view.inputmethod.InputMethodManager;
20 20
21 import org.chromium.base.CalledByNative; 21 import org.chromium.base.CalledByNative;
22 import org.chromium.base.JNINamespace; 22 import org.chromium.base.JNINamespace;
23 import org.chromium.content.app.AppResource; 23 import org.chromium.content.R;
nilesh 2012/11/19 18:16:56 Import not used?
24 24
25 // We have to adapt and plumb android IME service and chrome text input API. 25 // We have to adapt and plumb android IME service and chrome text input API.
26 // ImeAdapter provides an interface in both ways native <-> java: 26 // ImeAdapter provides an interface in both ways native <-> java:
27 // 1. InputConnectionAdapter notifies native code of text composition state and 27 // 1. InputConnectionAdapter notifies native code of text composition state and
28 // dispatch key events from java -> WebKit. 28 // dispatch key events from java -> WebKit.
29 // 2. Native ImeAdapter notifies java side to clear composition text. 29 // 2. Native ImeAdapter notifies java side to clear composition text.
30 // 30 //
31 // The basic flow is: 31 // The basic flow is:
32 // 1. Intercept dispatchKeyEventPreIme() to record the current key event, but do 32 // 1. Intercept dispatchKeyEventPreIme() to record the current key event, but do
33 // nothing else. 33 // nothing else.
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 834
835 private native void nativeDeleteSurroundingText(int nativeImeAdapterAndroid, 835 private native void nativeDeleteSurroundingText(int nativeImeAdapterAndroid,
836 int before, int after); 836 int before, int after);
837 837
838 private native void nativeUnselect(int nativeImeAdapterAndroid); 838 private native void nativeUnselect(int nativeImeAdapterAndroid);
839 private native void nativeSelectAll(int nativeImeAdapterAndroid); 839 private native void nativeSelectAll(int nativeImeAdapterAndroid);
840 private native void nativeCut(int nativeImeAdapterAndroid); 840 private native void nativeCut(int nativeImeAdapterAndroid);
841 private native void nativeCopy(int nativeImeAdapterAndroid); 841 private native void nativeCopy(int nativeImeAdapterAndroid);
842 private native void nativePaste(int nativeImeAdapterAndroid); 842 private native void nativePaste(int nativeImeAdapterAndroid);
843 } 843 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698