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

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

Issue 2298093008: android webview: Upstream android 7 glue layer (Closed)
Patch Set: Created 4 years, 3 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
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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 response.getReasonPhrase(), 323 response.getReasonPhrase(),
324 responseHeaders); 324 responseHeaders);
325 } finally { 325 } finally {
326 TraceEvent.end("WebViewContentsClientAdapter.shouldInterceptRequest" ); 326 TraceEvent.end("WebViewContentsClientAdapter.shouldInterceptRequest" );
327 } 327 }
328 } 328 }
329 329
330 /** 330 /**
331 * @see AwContentsClient#shouldOverrideUrlLoading(AwContentsClient.AwWebReso urceRequest) 331 * @see AwContentsClient#shouldOverrideUrlLoading(AwContentsClient.AwWebReso urceRequest)
332 */ 332 */
333 @TargetApi(Build.VERSION_CODES.N)
333 @Override 334 @Override
334 public boolean shouldOverrideUrlLoading(AwContentsClient.AwWebResourceReques t request) { 335 public boolean shouldOverrideUrlLoading(AwContentsClient.AwWebResourceReques t request) {
335 try { 336 try {
336 TraceEvent.begin("WebViewContentsClientAdapter.shouldOverrideUrlLoad ing"); 337 TraceEvent.begin("WebViewContentsClientAdapter.shouldOverrideUrlLoad ing");
337 if (TRACE) Log.d(TAG, "shouldOverrideUrlLoading=" + request.url); 338 if (TRACE) Log.d(TAG, "shouldOverrideUrlLoading=" + request.url);
338 boolean result; 339 boolean result;
339 result = mWebViewClient.shouldOverrideUrlLoading(mWebView, request.u rl); 340 if (Build.VERSION.CODENAME.equals("N")
341 || Build.VERSION.SDK_INT > Build.VERSION_CODES.M) {
342 result = mWebViewClient.shouldOverrideUrlLoading(
343 mWebView, new WebResourceRequestImpl(request));
344 } else {
345 result = mWebViewClient.shouldOverrideUrlLoading(mWebView, reque st.url);
346 }
340 return result; 347 return result;
341 } finally { 348 } finally {
342 TraceEvent.end("WebViewContentsClientAdapter.shouldOverrideUrlLoadin g"); 349 TraceEvent.end("WebViewContentsClientAdapter.shouldOverrideUrlLoadin g");
343 } 350 }
344 } 351 }
345 352
346 /** 353 /**
347 * @see AwContentsClient#onUnhandledKeyEvent(android.view.KeyEvent) 354 * @see AwContentsClient#onUnhandledKeyEvent(android.view.KeyEvent)
348 */ 355 */
349 @Override 356 @Override
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 mAwPermissionRequest.deny(); 1292 mAwPermissionRequest.deny();
1286 } 1293 }
1287 } 1294 }
1288 1295
1289 @Override 1296 @Override
1290 public void deny() { 1297 public void deny() {
1291 mAwPermissionRequest.deny(); 1298 mAwPermissionRequest.deny();
1292 } 1299 }
1293 } 1300 }
1294 } 1301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698