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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Add more comments Created 3 years, 12 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 92c24c983c1916478a95ecf393038a6603a89329..beb9bf4bc09f5fb5a5b72e1b1d4e175f83fea04e 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
@@ -432,9 +432,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