WebViewFactoryProvider.java revision 3c90952036a5ff7ddb2946c643f1a0bf1c31d53a
1/* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.webkit; 18 19/** 20 * This is the main entry-point into the WebView back end implementations, which the WebView 21 * proxy class uses to instantiate all the other objects as needed. The backend must provide an 22 * implementation of this interface, and make it available to the WebView via mechanism TBD. 23 * @hide 24 */ 25public interface WebViewFactoryProvider { 26 27 /** 28 * Construct a new WebView provider. 29 * @param webView the WebView instance bound to this implementation instance. Note it will not 30 * necessarily be fully constructed at the point of this call: defer real initialization to 31 * WebViewProvider.init(). 32 * @param privateAccess provides access into WebView internal methods. 33 */ 34 WebViewProvider createWebView(WebView webView, WebView.PrivateAccess privateAccess); 35 36 Statics getStatics(); 37 38 /** 39 * This Interface provides glue for implementing the backend of WebView static methods which 40 * cannot be implemented in-situ in the proxy class. 41 */ 42 interface Statics { 43 /** 44 * Implements the API method: 45 * {@link android.webkit.WebView#findAddress(String)} 46 */ 47 String findAddress(String addr); 48 49 /** 50 * Implements the API methods: 51 * {@link android.webkit.WebView#enablePlatformNotifications()} 52 * {@link android.webkit.WebView#disablePlatformNotifications()} 53 */ 54 void setPlatformNotificationsEnabled(boolean enable); 55 } 56} 57