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

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

Issue 574673003: Move *Picker.java and *PickerDialog.java to ui/android/java/... - Part1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased patch. Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698