• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 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 
17 package com.android.webview.nullwebview;
18 
19 import android.content.Context;
20 import android.webkit.CookieManager;
21 import android.webkit.GeolocationPermissions;
22 import android.webkit.ServiceWorkerController;
23 import android.webkit.TokenBindingService;
24 import android.webkit.WebIconDatabase;
25 import android.webkit.WebStorage;
26 import android.webkit.WebView;
27 import android.webkit.WebViewDatabase;
28 import android.webkit.WebViewDelegate;
29 import android.webkit.WebViewFactoryProvider;
30 import android.webkit.WebViewProvider;
31 
32 public class NullWebViewFactoryProvider implements WebViewFactoryProvider {
33 
create(WebViewDelegate delegate)34     public static WebViewFactoryProvider create(WebViewDelegate delegate) {
35         return new NullWebViewFactoryProvider(delegate);
36     }
37 
NullWebViewFactoryProvider(WebViewDelegate delegate)38     public NullWebViewFactoryProvider(WebViewDelegate delegate) {
39     }
40 
41     @Override
getStatics()42     public WebViewFactoryProvider.Statics getStatics() {
43         throw new UnsupportedOperationException();
44     }
45 
46     @Override
createWebView(WebView webView, WebView.PrivateAccess privateAccess)47     public WebViewProvider createWebView(WebView webView, WebView.PrivateAccess privateAccess) {
48         throw new UnsupportedOperationException();
49     }
50 
51     @Override
getGeolocationPermissions()52     public GeolocationPermissions getGeolocationPermissions() {
53         throw new UnsupportedOperationException();
54     }
55 
56     @Override
getCookieManager()57     public CookieManager getCookieManager() {
58         throw new UnsupportedOperationException();
59     }
60 
61     @Override
getTokenBindingService()62     public TokenBindingService getTokenBindingService() {
63         throw new UnsupportedOperationException();
64     }
65 
66     @Override
getServiceWorkerController()67     public ServiceWorkerController getServiceWorkerController() {
68         throw new UnsupportedOperationException();
69     }
70 
71     @Override
getWebIconDatabase()72     public WebIconDatabase getWebIconDatabase() {
73         throw new UnsupportedOperationException();
74     }
75 
76     @Override
getWebStorage()77     public WebStorage getWebStorage() {
78         throw new UnsupportedOperationException();
79     }
80 
81     @Override
getWebViewDatabase(Context context)82     public WebViewDatabase getWebViewDatabase(Context context) {
83         throw new UnsupportedOperationException();
84     }
85 }
86