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

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

Issue 56643003: Start using FocusedNodedChanged to restartInput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 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 | « content/port/browser/render_widget_host_view_port.h ('k') | content/renderer/render_view_browsertest.cc » ('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/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 c0d0278902887f8308054b50d3cecc98c6fc47d5..b4e41b99537acdb459bf5b73df5d05e6b3596395 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
@@ -39,6 +39,9 @@ import org.chromium.base.JNINamespace;
*/
@JNINamespace("content")
public class ImeAdapter {
+ /**
+ * Interface for the delegate that needs to be notified of IME changes.
+ */
public interface ImeAdapterDelegate {
/**
* @param isFinish whether the event is occurring because input is finished.
@@ -119,6 +122,9 @@ public class ImeAdapter {
mHandler = new Handler();
}
+ /**
+ * Default factory for AdapterInputConnection classes.
+ */
public static class AdapterInputConnectionFactory {
public AdapterInputConnection get(View view, ImeAdapter imeAdapter, EditorInfo outAttrs) {
return new AdapterInputConnection(view, imeAdapter, outAttrs);
@@ -491,10 +497,13 @@ public class ImeAdapter {
}
@CalledByNative
+ private void focusedNodeChanged(boolean isEditable) {
+ if (mInputConnection != null && isEditable) mInputConnection.restartInput();
+ }
+
+ @CalledByNative
private void cancelComposition() {
- if (mInputConnection != null) {
- mInputConnection.restartInput();
- }
+ if (mInputConnection != null) mInputConnection.restartInput();
}
@CalledByNative
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698