public interface

WebViewProviderFactory

 androidx.webkit.internal.WebViewProviderFactory

Subclasses:

WebViewProviderFactoryAdapter, IncompatibleApkWebViewProviderFactory

Gradle dependencies

compile group: 'androidx.webkit', name: 'webkit', version: '1.5.0-alpha01'

  • groupId: androidx.webkit
  • artifactId: webkit
  • version: 1.5.0-alpha01

Artifact androidx.webkit:webkit:1.5.0-alpha01 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.webkit:webkit com.android.support:webkit

Overview

Interface representing . On device with a compatible WebView APK this interface is implemented by a class defined in the WebView APK itself. On devices without a compatible WebView APK this interface is implemented by a stub class IncompatibleApkWebViewProviderFactory.

Summary

Methods
public org.chromium.support_lib_boundary.WebViewProviderBoundaryInterfacecreateWebView(WebView webview)

Create a support library version of .

public org.chromium.support_lib_boundary.ProxyControllerBoundaryInterfacegetProxyController()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterfacegetServiceWorkerController()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.StaticsBoundaryInterfacegetStatics()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.TracingControllerBoundaryInterfacegetTracingController()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterfacegetWebkitToCompatConverter()

Create the boundary interface for WebkitToCompatConverter which converts android.webkit classes into their corresponding support library classes.

public java.lang.StringgetWebViewFeatures()

Fetch the features supported by the current WebView APK.

Methods

public org.chromium.support_lib_boundary.WebViewProviderBoundaryInterface createWebView(WebView webview)

Create a support library version of .

public org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterface getWebkitToCompatConverter()

Create the boundary interface for WebkitToCompatConverter which converts android.webkit classes into their corresponding support library classes.

public org.chromium.support_lib_boundary.StaticsBoundaryInterface getStatics()

Fetch the boundary interface representing .

public java.lang.String getWebViewFeatures()

Fetch the features supported by the current WebView APK.

public org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterface getServiceWorkerController()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.TracingControllerBoundaryInterface getTracingController()

Fetch the boundary interface representing .

public org.chromium.support_lib_boundary.ProxyControllerBoundaryInterface getProxyController()

Fetch the boundary interface representing .

Source

/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.webkit.internal;

import android.webkit.TracingController;
import android.webkit.WebView;

import androidx.annotation.NonNull;

import org.chromium.support_lib_boundary.ProxyControllerBoundaryInterface;
import org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterface;
import org.chromium.support_lib_boundary.StaticsBoundaryInterface;
import org.chromium.support_lib_boundary.TracingControllerBoundaryInterface;
import org.chromium.support_lib_boundary.WebViewProviderBoundaryInterface;
import org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterface;

/**
 * Interface representing {@link android.webkit.WebViewFactoryProvider}.
 * On device with a compatible WebView APK this interface is implemented by a class defined in the
 * WebView APK itself.
 * On devices without a compatible WebView APK this interface is implemented by a stub class
 * {@link androidx.webkit.internal.IncompatibleApkWebViewProviderFactory}.
 */
@SuppressWarnings("JavadocReference") // WebViewFactoryProvider and WebViewProvider are hidden.
public interface WebViewProviderFactory {
    /**
     * Create a support library version of {@link android.webkit.WebViewProvider}.
     */
    @NonNull
    WebViewProviderBoundaryInterface createWebView(@NonNull WebView webview);

    /**
     * Create the boundary interface for {@link WebkitToCompatConverter}
     * which converts android.webkit classes into their corresponding support library classes.
     */
    @NonNull
    WebkitToCompatConverterBoundaryInterface getWebkitToCompatConverter();

    /**
     * Fetch the boundary interface representing
     * {@link android.webkit.WebViewFactoryProvider#Statics}.
     */
    @NonNull
    StaticsBoundaryInterface getStatics();

    /**
     * Fetch the features supported by the current WebView APK.
     */
    @NonNull
    String[] getWebViewFeatures();

    /**
     * Fetch the boundary interface representing {@link android.webkit.ServiceWorkerController}.
     */
    @NonNull
    ServiceWorkerControllerBoundaryInterface getServiceWorkerController();

    /**
     * Fetch the boundary interface representing {@link TracingController}.
     */
    @NonNull
    TracingControllerBoundaryInterface getTracingController();

    /**
     * Fetch the boundary interface representing {@link android.webkit.ProxyController}.
     */
    @NonNull
    ProxyControllerBoundaryInterface getProxyController();
}