| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |