Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java

Issue 2386513002: Implement getWebViewClient and getWebChromeClient (Closed)
Patch Set: Return null instead of sNullWebViewClient Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.content.Context; 9 import android.content.Context;
10 import android.graphics.Bitmap; 10 import android.graphics.Bitmap;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 void setWebViewClient(WebViewClient client) { 166 void setWebViewClient(WebViewClient client) {
167 if (client != null) { 167 if (client != null) {
168 mWebViewClient = client; 168 mWebViewClient = client;
169 } else { 169 } else {
170 mWebViewClient = sNullWebViewClient; 170 mWebViewClient = sNullWebViewClient;
171 } 171 }
172 } 172 }
173 173
174 WebViewClient getWebViewClient() {
175 // If this hasn't been set yet, return null instead of exposing sNullWeb ViewClient
176 return mWebViewClient == sNullWebViewClient ? null : mWebView;
hush (inactive) 2016/09/30 18:33:10 you meant to return mWebViewCient?
Nate Fischer 2016/09/30 18:40:21 Whoops, fixed it
177 }
178
174 void setWebChromeClient(WebChromeClient client) { 179 void setWebChromeClient(WebChromeClient client) {
175 mWebChromeClient = client; 180 mWebChromeClient = client;
176 } 181 }
177 182
183 WebChromeClient getWebChromeClient() {
184 return mWebChromeClient;
185 }
186
178 void setDownloadListener(DownloadListener listener) { 187 void setDownloadListener(DownloadListener listener) {
179 mDownloadListener = listener; 188 mDownloadListener = listener;
180 } 189 }
181 190
182 void setFindListener(WebView.FindListener listener) { 191 void setFindListener(WebView.FindListener listener) {
183 mFindListener = listener; 192 mFindListener = listener;
184 } 193 }
185 194
186 void setPictureListener(WebView.PictureListener listener, boolean invalidate Only) { 195 void setPictureListener(WebView.PictureListener listener, boolean invalidate Only) {
187 mPictureListener = listener; 196 mPictureListener = listener;
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 mAwPermissionRequest.deny(); 1305 mAwPermissionRequest.deny();
1297 } 1306 }
1298 } 1307 }
1299 1308
1300 @Override 1309 @Override
1301 public void deny() { 1310 public void deny() {
1302 mAwPermissionRequest.deny(); 1311 mAwPermissionRequest.deny();
1303 } 1312 }
1304 } 1313 }
1305 } 1314 }
OLDNEW
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698