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

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: 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.content.pm.ActivityInfo; 10 import android.content.pm.ActivityInfo;
11 import android.graphics.Bitmap; 11 import android.graphics.Bitmap;
12 import android.graphics.Picture; 12 import android.graphics.Picture;
13 import android.net.Uri; 13 import android.net.Uri;
14 import android.net.http.SslError; 14 import android.net.http.SslError;
15 import android.os.Looper; 15 import android.os.Looper;
16 import android.os.Message; 16 import android.os.Message;
17 import android.view.KeyEvent; 17 import android.view.KeyEvent;
18 import android.view.View; 18 import android.view.View;
19 import android.webkit.ConsoleMessage; 19 import android.webkit.ConsoleMessage;
20 import android.webkit.GeolocationPermissions; 20 import android.webkit.GeolocationPermissions;
21 import android.webkit.ValueCallback; 21 import android.webkit.ValueCallback;
22 import android.webkit.WebChromeClient; 22 import android.webkit.WebChromeClient;
23 23
24 import org.chromium.android_webview.permission.AwPermissionRequest; 24 import org.chromium.android_webview.permission.AwPermissionRequest;
25 import org.chromium.base.annotations.SuppressFBWarnings;
25 26
26 import java.security.Principal; 27 import java.security.Principal;
27 import java.util.HashMap; 28 import java.util.HashMap;
28 29
29 /** 30 /**
30 * Base-class that an AwContents embedder derives from to receive callbacks. 31 * Base-class that an AwContents embedder derives from to receive callbacks.
31 * This extends ContentViewClient, as in many cases we want to pass-thru Content ViewCore 32 * This extends ContentViewClient, as in many cases we want to pass-thru Content ViewCore
32 * callbacks right to our embedder, and this setup facilities that. 33 * callbacks right to our embedder, and this setup facilities that.
33 * For any other callbacks we need to make transformations of (e.g. adapt parame ters 34 * For any other callbacks we need to make transformations of (e.g. adapt parame ters
34 * or perform filtering) we can provide final overrides for methods here, and th en introduce 35 * 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
73 mCachedRendererBackgroundColor = color == INVALID_COLOR ? 1 : color; 74 mCachedRendererBackgroundColor = color == INVALID_COLOR ? 1 : color;
74 } 75 }
75 76
76 //-------------------------------------------------------------------------- ------------------ 77 //-------------------------------------------------------------------------- ------------------
77 // WebView specific methods that map directly to WebViewClient / WebChromeClient 78 // WebView specific methods that map directly to WebViewClient / WebChromeClient
78 //-------------------------------------------------------------------------- ------------------ 79 //-------------------------------------------------------------------------- ------------------
79 80
80 /** 81 /**
81 * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method . 82 * Parameters for the {@link AwContentsClient#shouldInterceptRequest} method .
82 */ 83 */
84 @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
83 public static class AwWebResourceRequest { 85 public static class AwWebResourceRequest {
84 // Url of the request. 86 // Url of the request.
85 public String url; 87 public String url;
86 // Is this for the main frame or a child iframe? 88 // Is this for the main frame or a child iframe?
87 public boolean isMainFrame; 89 public boolean isMainFrame;
88 // Was a gesture associated with the request? Don't trust can easily be spoofed. 90 // Was a gesture associated with the request? Don't trust can easily be spoofed.
89 public boolean hasUserGesture; 91 public boolean hasUserGesture;
90 // Method used (GET/POST/OPTIONS) 92 // Method used (GET/POST/OPTIONS)
91 public String method; 93 public String method;
92 // Headers that would have been sent to server. 94 // Headers that would have been sent to server.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 public abstract void onFindResultReceived(int activeMatchOrdinal, int number OfMatches, 327 public abstract void onFindResultReceived(int activeMatchOrdinal, int number OfMatches,
326 boolean isDoneCounting); 328 boolean isDoneCounting);
327 329
328 /** 330 /**
329 * Called whenever there is a new content picture available. 331 * Called whenever there is a new content picture available.
330 * @param picture New picture. 332 * @param picture New picture.
331 */ 333 */
332 public abstract void onNewPicture(Picture picture); 334 public abstract void onNewPicture(Picture picture);
333 335
334 } 336 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698