OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.permission; | 5 package org.chromium.android_webview.permission; |
6 | 6 |
7 import android.webkit.GeolocationPermissions; | 7 import android.webkit.GeolocationPermissions; |
8 | 8 |
9 import org.chromium.android_webview.AwContents; | 9 import org.chromium.android_webview.AwContents; |
| 10 import org.chromium.android_webview.CleanupReference; |
10 import org.chromium.base.Log; | 11 import org.chromium.base.Log; |
11 import org.chromium.base.ThreadUtils; | 12 import org.chromium.base.ThreadUtils; |
12 import org.chromium.content.common.CleanupReference; | |
13 | 13 |
14 import java.lang.ref.WeakReference; | 14 import java.lang.ref.WeakReference; |
15 | 15 |
16 /** | 16 /** |
17 * This class implements GeolocationPermissions.Callback, and will be sent to | 17 * This class implements GeolocationPermissions.Callback, and will be sent to |
18 * WebView applications through WebChromeClient.onGeolocationPermissionsShowProm
pt(). | 18 * WebView applications through WebChromeClient.onGeolocationPermissionsShowProm
pt(). |
19 */ | 19 */ |
20 public class AwGeolocationCallback implements GeolocationPermissions.Callback { | 20 public class AwGeolocationCallback implements GeolocationPermissions.Callback { |
21 private static final String TAG = "cr.Geolocation"; | 21 private static final String TAG = "cr.Geolocation"; |
22 | 22 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 Log.w(TAG, "Response for this geolocation request has been received.
" | 67 Log.w(TAG, "Response for this geolocation request has been received.
" |
68 + " Ignoring subsequent responses"); | 68 + " Ignoring subsequent responses"); |
69 return; | 69 return; |
70 } | 70 } |
71 mCleanupRunable.setResponse(origin, allow, retain); | 71 mCleanupRunable.setResponse(origin, allow, retain); |
72 mCleanupReference.cleanupNow(); | 72 mCleanupReference.cleanupNow(); |
73 mCleanupReference = null; | 73 mCleanupReference = null; |
74 mCleanupRunable = null; | 74 mCleanupRunable = null; |
75 } | 75 } |
76 } | 76 } |
OLD | NEW |