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

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

Issue 2349383004: Implement ThreadedInputConnection#getCursorCapsMode() (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12b3906a2dc62f7e41fb9fe28dc649619779124c..c5e776471ee6064538efa2c66161a842a4066847 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
@@ -7,6 +7,7 @@ package org.chromium.content.browser.input;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
+import android.text.TextUtils;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
@@ -572,9 +573,14 @@ public class ThreadedInputConnection extends BaseInputConnection
*/
@Override
public int getCursorCapsMode(int reqModes) {
- if (DEBUG_LOGS) Log.w(TAG, "getCursorCapsMode [%x]", reqModes);
- // TODO(changwan): implement this.
- return 0;
+ TextInputState textInputState = requestAndWaitForTextInputState();
+ int result = 0;
+ if (textInputState != null) {
+ result = TextUtils.getCapsMode(
+ textInputState.text(), textInputState.selection().start(), reqModes);
+ }
+ if (DEBUG_LOGS) Log.w(TAG, "getCursorCapsMode [%x]: %x", reqModes, result);
+ return result;
}
/**
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698