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

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

Issue 1397083003: Remove never_lint from WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: suppress resouces Created 5 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
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.content.Context; 8 import android.content.Context;
8 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
9 import android.graphics.BitmapFactory; 10 import android.graphics.BitmapFactory;
10 import android.graphics.Canvas; 11 import android.graphics.Canvas;
11 import android.graphics.Color; 12 import android.graphics.Color;
12 import android.graphics.Picture; 13 import android.graphics.Picture;
13 import android.net.Uri; 14 import android.net.Uri;
14 import android.net.http.SslError; 15 import android.net.http.SslError;
15 import android.os.Build; 16 import android.os.Build;
16 import android.os.Handler; 17 import android.os.Handler;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 * 73 *
73 * A {@link ContentViewClient} may be shared between multiple {@link ContentView }s, 74 * A {@link ContentViewClient} may be shared between multiple {@link ContentView }s,
74 * and hence multiple WebViews. Many WebViewClient methods pass the source 75 * and hence multiple WebViews. Many WebViewClient methods pass the source
75 * WebView as an argument. This means that we either need to pass the 76 * WebView as an argument. This means that we either need to pass the
76 * corresponding ContentView to the corresponding ContentViewClient methods, 77 * corresponding ContentView to the corresponding ContentViewClient methods,
77 * or use an instance of ContentViewClientAdapter per WebViewChromium, to 78 * or use an instance of ContentViewClientAdapter per WebViewChromium, to
78 * allow the source WebView to be injected by ContentViewClientAdapter. We 79 * allow the source WebView to be injected by ContentViewClientAdapter. We
79 * choose the latter, because it makes for a cleaner design. 80 * choose the latter, because it makes for a cleaner design.
80 */ 81 */
81 @SuppressWarnings("deprecation") 82 @SuppressWarnings("deprecation")
83 @SuppressLint("NewApi")
newt (away) 2015/10/13 20:41:38 same deal here
michaelbai 2015/10/13 21:40:15 Changed to use TargetApi, but it is a little bit o
82 public class WebViewContentsClientAdapter extends AwContentsClient { 84 public class WebViewContentsClientAdapter extends AwContentsClient {
83 // TAG is chosen for consistency with classic webview tracing. 85 // TAG is chosen for consistency with classic webview tracing.
84 private static final String TAG = "WebViewCallback"; 86 private static final String TAG = "WebViewCallback";
85 // Enables API callback tracing 87 // Enables API callback tracing
86 private static final boolean TRACE = false; 88 private static final boolean TRACE = false;
87 // Default WebViewClient used to avoid null checks. 89 // Default WebViewClient used to avoid null checks.
88 private static WebViewClient sNullWebViewClient = new WebViewClient(); 90 private static WebViewClient sNullWebViewClient = new WebViewClient();
89 // The WebView instance that this adapter is serving. 91 // The WebView instance that this adapter is serving.
90 private final WebView mWebView; 92 private final WebView mWebView;
91 // The Context to use. This is different from mWebView.getContext(), which s hould not be used. 93 // The Context to use. This is different from mWebView.getContext(), which s hould not be used.
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 mAwPermissionRequest.deny(); 1275 mAwPermissionRequest.deny();
1274 } 1276 }
1275 } 1277 }
1276 1278
1277 @Override 1279 @Override
1278 public void deny() { 1280 public void deny() {
1279 mAwPermissionRequest.deny(); 1281 mAwPermissionRequest.deny();
1280 } 1282 }
1281 } 1283 }
1282 } 1284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698