Expose ImeAdapter::advanceFocusInForm

A downstream change needs to be able to advance focus from outside
of the IME. See bug for details.

Bug: 938534
Change-Id: Iaac50da5a2b3b8459f18618a948e294656bc55ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584701
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654228}
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
index 78d7395..8fcf56d 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
@@ -766,12 +766,8 @@
         return true;
     }
 
-    /**
-     * Advances the focus to next input field in the current form.
-     *
-     * @param focusType indicates whether to advance forward or backward direction.
-     */
-    private void advanceFocusInForm(int focusType) {
+    @Override
+    public void advanceFocusInForm(int focusType) {
         if (mNativeImeAdapterAndroid == 0) return;
         nativeAdvanceFocusInForm(mNativeImeAdapterAndroid, focusType);
     }
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/ImeAdapter.java b/content/public/android/java/src/org/chromium/content_public/browser/ImeAdapter.java
index 10aace5..031766f 100644
--- a/content/public/android/java/src/org/chromium/content_public/browser/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content_public/browser/ImeAdapter.java
@@ -67,6 +67,13 @@
     void setInputMethodManagerWrapper(InputMethodManagerWrapper immw);
 
     /**
+     * Advances the focus to next input field in the current form.
+     *
+     * @param focusType indicates whether to advance forward or backward direction.
+     */
+    void advanceFocusInForm(int focusType);
+
+    /**
      * @return a newly instantiated {@link ResultReceiver} used to scroll to the editable
      *     node at the right timing.
      */