OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.input; | 5 package org.chromium.content.browser.input; |
6 | 6 |
7 import android.os.Handler; | 7 import android.os.Handler; |
8 import android.os.ResultReceiver; | 8 import android.os.ResultReceiver; |
9 import android.os.SystemClock; | 9 import android.os.SystemClock; |
10 import android.text.Editable; | 10 import android.text.Editable; |
11 import android.text.SpannableString; | 11 import android.text.SpannableString; |
12 import android.text.style.BackgroundColorSpan; | 12 import android.text.style.BackgroundColorSpan; |
13 import android.text.style.CharacterStyle; | 13 import android.text.style.CharacterStyle; |
14 import android.text.style.UnderlineSpan; | 14 import android.text.style.UnderlineSpan; |
15 import android.view.KeyCharacterMap; | 15 import android.view.KeyCharacterMap; |
16 import android.view.KeyEvent; | 16 import android.view.KeyEvent; |
17 import android.view.View; | 17 import android.view.View; |
18 import android.view.inputmethod.EditorInfo; | 18 import android.view.inputmethod.EditorInfo; |
19 | 19 |
20 import java.lang.CharSequence; | 20 import java.lang.CharSequence; |
21 | 21 |
22 import org.chromium.base.CalledByNative; | 22 import org.chromium.base.CalledByNative; |
23 import org.chromium.base.JNINamespace; | 23 import org.chromium.base.JNINamespace; |
24 import org.chromium.base.VisibleForTesting; | 24 import org.chromium.base.VisibleForTesting; |
| 25 import org.chromium.ui.picker.InputDialogContainer; |
25 | 26 |
26 /** | 27 /** |
27 * Adapts and plumbs android IME service onto the chrome text input API. | 28 * Adapts and plumbs android IME service onto the chrome text input API. |
28 * ImeAdapter provides an interface in both ways native <-> java: | 29 * ImeAdapter provides an interface in both ways native <-> java: |
29 * 1. InputConnectionAdapter notifies native code of text composition state and | 30 * 1. InputConnectionAdapter notifies native code of text composition state and |
30 * dispatch key events from java -> WebKit. | 31 * dispatch key events from java -> WebKit. |
31 * 2. Native ImeAdapter notifies java side to clear composition text. | 32 * 2. Native ImeAdapter notifies java side to clear composition text. |
32 * | 33 * |
33 * The basic flow is: | 34 * The basic flow is: |
34 * 1. When InputConnectionAdapter gets called with composition or result text: | 35 * 1. When InputConnectionAdapter gets called with composition or result text: |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid
, | 727 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid
, |
727 int before, int after); | 728 int before, int after); |
728 | 729 |
729 private native void nativeUnselect(long nativeImeAdapterAndroid); | 730 private native void nativeUnselect(long nativeImeAdapterAndroid); |
730 private native void nativeSelectAll(long nativeImeAdapterAndroid); | 731 private native void nativeSelectAll(long nativeImeAdapterAndroid); |
731 private native void nativeCut(long nativeImeAdapterAndroid); | 732 private native void nativeCut(long nativeImeAdapterAndroid); |
732 private native void nativeCopy(long nativeImeAdapterAndroid); | 733 private native void nativeCopy(long nativeImeAdapterAndroid); |
733 private native void nativePaste(long nativeImeAdapterAndroid); | 734 private native void nativePaste(long nativeImeAdapterAndroid); |
734 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); | 735 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); |
735 } | 736 } |
OLD | NEW |