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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address cjhopman's comment + rebase Created 5 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.graphics.Bitmap; 10 import android.graphics.Bitmap;
11 import android.graphics.Picture; 11 import android.graphics.Picture;
12 import android.net.Uri; 12 import android.net.Uri;
13 import android.net.http.SslError; 13 import android.net.http.SslError;
14 import android.os.Looper; 14 import android.os.Looper;
15 import android.os.Message; 15 import android.os.Message;
16 import android.view.KeyEvent; 16 import android.view.KeyEvent;
17 import android.view.View; 17 import android.view.View;
18 import android.webkit.ConsoleMessage; 18 import android.webkit.ConsoleMessage;
19 import android.webkit.GeolocationPermissions; 19 import android.webkit.GeolocationPermissions;
20 import android.webkit.ValueCallback; 20 import android.webkit.ValueCallback;
21 import android.webkit.WebChromeClient; 21 import android.webkit.WebChromeClient;
22 22
23 import org.chromium.android_webview.permission.AwPermissionRequest; 23 import org.chromium.android_webview.permission.AwPermissionRequest;
24 import org.chromium.base.annotations.SuppressFBWarnings;
24 25
25 import java.security.Principal; 26 import java.security.Principal;
26 import java.util.HashMap; 27 import java.util.HashMap;
27 28
28 /** 29 /**
29 * Base-class that an AwContents embedder derives from to receive callbacks. 30 * Base-class that an AwContents embedder derives from to receive callbacks.
30 * This extends ContentViewClient, as in many cases we want to pass-thru Content ViewCore 31 * This extends ContentViewClient, as in many cases we want to pass-thru Content ViewCore
31 * callbacks right to our embedder, and this setup facilities that. 32 * callbacks right to our embedder, and this setup facilities that.
32 * For any other callbacks we need to make transformations of (e.g. adapt parame ters 33 * For any other callbacks we need to make transformations of (e.g. adapt parame ters
33 * or perform filtering) we can provide final overrides for methods here, and th en introduce 34 * or perform filtering) we can provide final overrides for methods here, and th en introduce
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 mCachedRendererBackgroundColor = color == INVALID_COLOR ? 1 : color; 73 mCachedRendererBackgroundColor = color == INVALID_COLOR ? 1 : color;
73 } 74 }
74 75
75 //-------------------------------------------------------------------------- ------------------ 76 //-------------------------------------------------------------------------- ------------------
76 // WebView specific methods that map directly to WebViewClient / WebChromeClient 77 // WebView specific methods that map directly to WebViewClient / WebChromeClient
77 //-------------------------------------------------------------------------- ------------------ 78 //-------------------------------------------------------------------------- ------------------
78 79
79 /** 80 /**
80 * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method . 81 * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method .
81 */ 82 */
83 @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
82 public static class AwWebResourceRequest { 84 public static class AwWebResourceRequest {
83 // Url of the request. 85 // Url of the request.
84 public String url; 86 public String url;
85 // Is this for the main frame or a child iframe? 87 // Is this for the main frame or a child iframe?
86 public boolean isMainFrame; 88 public boolean isMainFrame;
87 // Was a gesture associated with the request? Don't trust can easily be spoofed. 89 // Was a gesture associated with the request? Don't trust can easily be spoofed.
88 public boolean hasUserGesture; 90 public boolean hasUserGesture;
89 // Method used (GET/POST/OPTIONS) 91 // Method used (GET/POST/OPTIONS)
90 public String method; 92 public String method;
91 // Headers that would have been sent to server. 93 // Headers that would have been sent to server.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 public abstract void onFindResultReceived(int activeMatchOrdinal, int number OfMatches, 313 public abstract void onFindResultReceived(int activeMatchOrdinal, int number OfMatches,
312 boolean isDoneCounting); 314 boolean isDoneCounting);
313 315
314 /** 316 /**
315 * Called whenever there is a new content picture available. 317 * Called whenever there is a new content picture available.
316 * @param picture New picture. 318 * @param picture New picture.
317 */ 319 */
318 public abstract void onNewPicture(Picture picture); 320 public abstract void onNewPicture(Picture picture);
319 321
320 } 322 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698