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 5f50cd3807c16df73dc4400ebd47d118c67ba3cf..399aa99bc3b909620a6bdd3b095a0e2e81b90a92 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 |
@@ -127,6 +127,7 @@ public class ImeAdapter { |
private DelayedDismissInput mDismissInput = null; |
private int mTextInputType; |
private String mLastComposeText; |
+ private int mInputElementMaxLength; |
@VisibleForTesting |
int mLastSyntheticKeyCode; |
@@ -562,6 +563,9 @@ public class ImeAdapter { |
return true; |
} |
+ public int getInputElementMaxLength() { |
+ return mInputElementMaxLength; |
+ } |
// Calls from C++ to Java |
@CalledByNative |
@@ -596,7 +600,8 @@ public class ImeAdapter { |
} |
@CalledByNative |
- private void focusedNodeChanged(boolean isEditable) { |
+ private void focusedNodeChanged(boolean isEditable, int editableNodeMaxLength) { |
+ mInputElementMaxLength = editableNodeMaxLength; |
if (mInputConnection != null && isEditable) mInputConnection.restartInput(); |
} |