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

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

Issue 433483003: Remove isFinish parameter from onImeEvent() method in ImeAdapterDelegate interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding AdapterInputConnectionTest.java modifications Created 6 years, 5 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/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index bc92bd0cb0716549647c03cc525fbf757c653e38..cc7868e12a8bd5c15a63b54fe23727ebc2070291 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -53,9 +53,9 @@ public class ImeAdapter {
*/
public interface ImeAdapterDelegate {
/**
- * @param isFinish whether the event is occurring because input is finished.
+ * Called to notify the delegate about synthetic/real key events before sending to renderer.
*/
- void onImeEvent(boolean isFinish);
+ void onImeEvent();
/**
* Called when a request to hide the keyboard is sent to InputMethodManager.
@@ -383,11 +383,9 @@ public class ImeAdapter {
boolean checkCompositionQueueAndCallNative(CharSequence text, int newCursorPosition,
boolean isCommit) {
if (mNativeImeAdapterAndroid == 0) return false;
- String textStr = text.toString();
+ mViewEmbedder.onImeEvent();
- // Committing an empty string finishes the current composition.
- boolean isFinish = textStr.isEmpty();
- mViewEmbedder.onImeEvent(isFinish);
+ String textStr = text.toString();
int keyCode = shouldSendKeyEventWithKeyCode(textStr);
long timeStampMs = SystemClock.uptimeMillis();
@@ -457,7 +455,7 @@ public class ImeAdapter {
// event.
return false;
}
- mViewEmbedder.onImeEvent(false);
+ mViewEmbedder.onImeEvent();
return nativeSendKeyEvent(mNativeImeAdapterAndroid, event, event.getAction(),
getModifiers(event.getMetaState()), event.getEventTime(), event.getKeyCode(),
/*isSystemKey=*/false, event.getUnicodeChar());
@@ -480,7 +478,7 @@ public class ImeAdapter {
* @return Whether the native counterpart of ImeAdapter received the call.
*/
boolean deleteSurroundingText(int beforeLength, int afterLength) {
- mViewEmbedder.onImeEvent(false);
+ mViewEmbedder.onImeEvent();
if (mNativeImeAdapterAndroid == 0) return false;
nativeDeleteSurroundingText(mNativeImeAdapterAndroid, beforeLength, afterLength);
return true;

Powered by Google App Engine
This is Rietveld 408576698