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

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

Issue 2268233004: Fix HandlerLeak lint warning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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
« no previous file with comments | « no previous file | no next file » | 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.TargetApi; 8 import android.annotation.TargetApi;
8 import android.content.Context; 9 import android.content.Context;
9 import android.graphics.Bitmap; 10 import android.graphics.Bitmap;
10 import android.graphics.BitmapFactory; 11 import android.graphics.BitmapFactory;
11 import android.graphics.Canvas; 12 import android.graphics.Canvas;
12 import android.graphics.Color; 13 import android.graphics.Color;
13 import android.graphics.Picture; 14 import android.graphics.Picture;
14 import android.net.Uri; 15 import android.net.Uri;
15 import android.net.http.SslError; 16 import android.net.http.SslError;
16 import android.os.Build; 17 import android.os.Build;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 private WebViewDelegate mWebViewDelegate; 104 private WebViewDelegate mWebViewDelegate;
104 105
105 private DownloadListener mDownloadListener; 106 private DownloadListener mDownloadListener;
106 107
107 private Handler mUiThreadHandler; 108 private Handler mUiThreadHandler;
108 109
109 private static final int NEW_WEBVIEW_CREATED = 100; 110 private static final int NEW_WEBVIEW_CREATED = 100;
110 111
111 private WeakHashMap<AwPermissionRequest, WeakReference<PermissionRequestAdap ter>> 112 private WeakHashMap<AwPermissionRequest, WeakReference<PermissionRequestAdap ter>>
112 mOngoingPermissionRequests; 113 mOngoingPermissionRequests;
114
113 /** 115 /**
114 * Adapter constructor. 116 * Adapter constructor.
115 * 117 *
116 * @param webView the {@link WebView} instance that this adapter is serving. 118 * @param webView the {@link WebView} instance that this adapter is serving.
117 */ 119 */
120 @SuppressLint("HandlerLeak")
118 WebViewContentsClientAdapter(WebView webView, Context context, 121 WebViewContentsClientAdapter(WebView webView, Context context,
119 WebViewDelegate webViewDelegate) { 122 WebViewDelegate webViewDelegate) {
120 if (webView == null || webViewDelegate == null) { 123 if (webView == null || webViewDelegate == null) {
121 throw new IllegalArgumentException("webView or delegate can't be nul l."); 124 throw new IllegalArgumentException("webView or delegate can't be nul l.");
122 } 125 }
123 126
124 if (context == null) { 127 if (context == null) {
125 throw new IllegalArgumentException("context can't be null."); 128 throw new IllegalArgumentException("context can't be null.");
126 } 129 }
127 130
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 mAwPermissionRequest.deny(); 1285 mAwPermissionRequest.deny();
1283 } 1286 }
1284 } 1287 }
1285 1288
1286 @Override 1289 @Override
1287 public void deny() { 1290 public void deny() {
1288 mAwPermissionRequest.deny(); 1291 mAwPermissionRequest.deny();
1289 } 1292 }
1290 } 1293 }
1291 } 1294 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698