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

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

Issue 2895293002: Android: tidy up outdated version checks. (Closed)
Patch Set: Created 3 years, 7 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 /** 342 /**
343 * @see AwContentsClient#shouldOverrideUrlLoading(AwContentsClient.AwWebReso urceRequest) 343 * @see AwContentsClient#shouldOverrideUrlLoading(AwContentsClient.AwWebReso urceRequest)
344 */ 344 */
345 @TargetApi(Build.VERSION_CODES.N) 345 @TargetApi(Build.VERSION_CODES.N)
346 @Override 346 @Override
347 public boolean shouldOverrideUrlLoading(AwContentsClient.AwWebResourceReques t request) { 347 public boolean shouldOverrideUrlLoading(AwContentsClient.AwWebResourceReques t request) {
348 try { 348 try {
349 TraceEvent.begin("WebViewContentsClientAdapter.shouldOverrideUrlLoad ing"); 349 TraceEvent.begin("WebViewContentsClientAdapter.shouldOverrideUrlLoad ing");
350 if (TRACE) Log.d(TAG, "shouldOverrideUrlLoading=" + request.url); 350 if (TRACE) Log.d(TAG, "shouldOverrideUrlLoading=" + request.url);
351 boolean result; 351 boolean result;
352 if (Build.VERSION.CODENAME.equals("N") 352 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
353 || Build.VERSION.SDK_INT > Build.VERSION_CODES.M) {
354 result = mWebViewClient.shouldOverrideUrlLoading( 353 result = mWebViewClient.shouldOverrideUrlLoading(
355 mWebView, new WebResourceRequestImpl(request)); 354 mWebView, new WebResourceRequestImpl(request));
356 } else { 355 } else {
357 result = mWebViewClient.shouldOverrideUrlLoading(mWebView, reque st.url); 356 result = mWebViewClient.shouldOverrideUrlLoading(mWebView, reque st.url);
358 } 357 }
359 return result; 358 return result;
360 } finally { 359 } finally {
361 TraceEvent.end("WebViewContentsClientAdapter.shouldOverrideUrlLoadin g"); 360 TraceEvent.end("WebViewContentsClientAdapter.shouldOverrideUrlLoadin g");
362 } 361 }
363 } 362 }
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 mAwPermissionRequest.deny(); 1309 mAwPermissionRequest.deny();
1311 } 1310 }
1312 } 1311 }
1313 1312
1314 @Override 1313 @Override
1315 public void deny() { 1314 public void deny() {
1316 mAwPermissionRequest.deny(); 1315 mAwPermissionRequest.deny();
1317 } 1316 }
1318 } 1317 }
1319 } 1318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698