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

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

Issue 2386513002: Implement getWebViewClient and getWebChromeClient (Closed)
Patch Set: Fixing error 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 | « no previous file | android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java » ('j') | 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.content.Intent; 10 import android.content.Intent;
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 return; 1229 return;
1230 } 1230 }
1231 mAwContents.documentHasImages(response); 1231 mAwContents.documentHasImages(response);
1232 } 1232 }
1233 1233
1234 @Override 1234 @Override
1235 public void setWebViewClient(WebViewClient client) { 1235 public void setWebViewClient(WebViewClient client) {
1236 mContentsClientAdapter.setWebViewClient(client); 1236 mContentsClientAdapter.setWebViewClient(client);
1237 } 1237 }
1238 1238
1239 // TODO(ntfschr): add @Override once the next Android is released (http://cr bug.com/627248)
1240 public WebViewClient getWebViewClient() {
1241 return mContentsClientAdapter.getWebViewClient();
1242 }
1243
1239 @Override 1244 @Override
1240 public void setDownloadListener(DownloadListener listener) { 1245 public void setDownloadListener(DownloadListener listener) {
1241 mContentsClientAdapter.setDownloadListener(listener); 1246 mContentsClientAdapter.setDownloadListener(listener);
1242 } 1247 }
1243 1248
1244 @Override 1249 @Override
1245 public void setWebChromeClient(WebChromeClient client) { 1250 public void setWebChromeClient(WebChromeClient client) {
1246 mWebSettings.getAwSettings().setFullscreenSupported(doesSupportFullscree n(client)); 1251 mWebSettings.getAwSettings().setFullscreenSupported(doesSupportFullscree n(client));
1247 mContentsClientAdapter.setWebChromeClient(client); 1252 mContentsClientAdapter.setWebChromeClient(client);
1248 } 1253 }
1249 1254
1255 // TODO(ntfschr): add @Override once the next Android is released (http://cr bug.com/627248)
1256 public WebChromeClient getWebChromeClient() {
1257 return mContentsClientAdapter.getWebChromeClient();
1258 }
1259
1250 /** 1260 /**
1251 * Returns true if the supplied {@link WebChromeClient} supports fullscreen. 1261 * Returns true if the supplied {@link WebChromeClient} supports fullscreen.
1252 * 1262 *
1253 * <p>For fullscreen support, implementations of {@link WebChromeClient#onSh owCustomView} 1263 * <p>For fullscreen support, implementations of {@link WebChromeClient#onSh owCustomView}
1254 * and {@link WebChromeClient#onHideCustomView()} are required. 1264 * and {@link WebChromeClient#onHideCustomView()} are required.
1255 */ 1265 */
1256 private boolean doesSupportFullscreen(WebChromeClient client) { 1266 private boolean doesSupportFullscreen(WebChromeClient client) {
1257 if (client == null) { 1267 if (client == null) {
1258 return false; 1268 return false;
1259 } 1269 }
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 mAwContents.extractSmartClipData(x, y, width, height); 2274 mAwContents.extractSmartClipData(x, y, width, height);
2265 } 2275 }
2266 2276
2267 // Implements SmartClipProvider 2277 // Implements SmartClipProvider
2268 @Override 2278 @Override
2269 public void setSmartClipResultHandler(final Handler resultHandler) { 2279 public void setSmartClipResultHandler(final Handler resultHandler) {
2270 checkThread(); 2280 checkThread();
2271 mAwContents.setSmartClipResultHandler(resultHandler); 2281 mAwContents.setSmartClipResultHandler(resultHandler);
2272 } 2282 }
2273 } 2283 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698