| Index: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| index 7d45271f971acaa7162e295e97ab1102af6a2fc3..210215e39261615013c9d19eb6f62299946fb0f3 100644
|
| --- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| +++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| @@ -57,6 +57,7 @@ import org.chromium.android_webview.AwSettings;
|
| import org.chromium.android_webview.ResourcesContextWrapperFactory;
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.annotations.SuppressFBWarnings;
|
| +import org.chromium.components.autofill.AutofillProvider;
|
| import org.chromium.content.browser.SmartClipProvider;
|
| import org.chromium.content_public.browser.NavigationHistory;
|
|
|
| @@ -101,7 +102,7 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
|
|
|
| private final int mAppTargetSdkVersion;
|
|
|
| - private WebViewChromiumFactoryProvider mFactory;
|
| + protected WebViewChromiumFactoryProvider mFactory;
|
|
|
| private final boolean mShouldDisableThreadChecking;
|
|
|
| @@ -230,7 +231,14 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
|
|
|
| mAwContents = new AwContents(mFactory.getBrowserContextOnUiThread(), mWebView, mContext,
|
| new InternalAccessAdapter(), new WebViewNativeDrawGLFunctorFactory(),
|
| - mContentsClientAdapter, mWebSettings.getAwSettings());
|
| + mContentsClientAdapter, mWebSettings.getAwSettings(),
|
| + new AwContents.DependencyFactory() {
|
| + @Override
|
| + public AutofillProvider createAutofillProvider(
|
| + Context context, ViewGroup containerView) {
|
| + return mFactory.createAutofillProvider(context, mWebView);
|
| + }
|
| + });
|
|
|
| if (mAppTargetSdkVersion >= Build.VERSION_CODES.KITKAT) {
|
| // On KK and above, favicons are automatically downloaded as the method
|
| @@ -253,7 +261,7 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
|
| "Calling View methods on another thread than the UI thread.");
|
| }
|
|
|
| - private boolean checkNeedsPost() {
|
| + protected boolean checkNeedsPost() {
|
| boolean needsPost = !mFactory.hasStarted() || !ThreadUtils.runningOnUiThread();
|
| if (!needsPost && mAwContents == null) {
|
| throw new IllegalStateException("AwContents must be created if we are not posting!");
|
|
|