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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Address dcheng@'s review Created 3 years, 10 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/input/ThreadedInputConnection.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
index f7dd561502a72e98746326fb60ee479245c72d27..274bb133dcd5099b940550f011da2b83a19ee4d5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
@@ -427,9 +427,21 @@ class ThreadedInputConnection extends BaseInputConnection implements ChromiumBas
/**
* @see InputConnection#deleteSurroundingTextInCodePoints(int, int)
*/
- public boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLength) {
- // TODO(changwan): Implement this. http://crbug.com/595525
- return false;
+ public boolean deleteSurroundingTextInCodePoints(
+ final int beforeLength, final int afterLength) {
+ if (DEBUG_LOGS) {
+ Log.w(TAG, "deleteSurroundingTextInCodePoints [%d %d]", beforeLength, afterLength);
+ }
+ ThreadUtils.postOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ if (mPendingAccent != 0) {
+ finishComposingTextOnUiThread();
+ }
+ mImeAdapter.deleteSurroundingTextInCodePoints(beforeLength, afterLength);
+ }
+ });
+ return true;
}
/**

Powered by Google App Engine
This is Rietveld 408576698