FileDocCategorySizeDatePackage
WebViewDelegateFactory.javaAPI DocAndroid 5.1 API14542Thu Mar 12 22:22:56 GMT 2015com.android.webview.chromium

WebViewDelegateFactory

public class WebViewDelegateFactory extends Object
Factory class for {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate}s.

{@link WebViewDelegate com.android.webview.chromium.WebViewDelegate}s provide the same interface as {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} but without a dependency on the webkit class. Defining our own {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} in frameworks/webview allows the WebView apk to be binary compatible with the API 21 version of the framework, in which {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} had not yet been introduced.

The {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} interface and this factory class can be removed once we don't longer need to support WebView apk updates to devices running the API 21 version of the framework. At that point, we should use {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} directly instead.

Fields Summary
Constructors Summary
Methods Summary
static com.android.webview.chromium.WebViewDelegateFactory$WebViewDelegatecreateApi21CompatibilityDelegate()
Creates a {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} compatible with the API 21 version of the framework in which {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate} had not yet been introduced.

return
the created delegate

        return new Api21CompatibilityDelegate();
    
static com.android.webview.chromium.WebViewDelegateFactory$WebViewDelegatecreateProxyDelegate(android.webkit.WebViewDelegate delegate)
Creates a {@link WebViewDelegate com.android.webview.chromium.WebViewDelegate} that proxies requests to the given {@link android.webkit.WebViewDelegate android.webkit.WebViewDelegate}.

return
the created delegate

        return new ProxyDelegate(delegate);