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.chrome.browser.preferences.website; | 5 package org.chromium.chrome.browser.preferences.website; |
6 | 6 |
7 import org.chromium.base.annotations.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | 8 import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
9 | 9 |
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 /** | 36 /** |
37 * Interface for an object that listens to storage info is cleared callback. | 37 * Interface for an object that listens to storage info is cleared callback. |
38 */ | 38 */ |
39 public interface StorageInfoClearedCallback { | 39 public interface StorageInfoClearedCallback { |
40 @CalledByNative("StorageInfoClearedCallback") | 40 @CalledByNative("StorageInfoClearedCallback") |
41 public void onStorageInfoCleared(); | 41 public void onStorageInfoCleared(); |
42 } | 42 } |
43 | 43 |
44 /** | 44 /** |
| 45 * @return the list of all origins that have keygen permissions in non-incog
nito mode. |
| 46 */ |
| 47 @SuppressWarnings("unchecked") |
| 48 public static List<KeygenInfo> getKeygenInfo() { |
| 49 ArrayList<KeygenInfo> list = new ArrayList<KeygenInfo>(); |
| 50 nativeGetKeygenOrigins(list); |
| 51 return list; |
| 52 } |
| 53 |
| 54 @CalledByNative |
| 55 private static void insertKeygenInfoIntoList( |
| 56 ArrayList<KeygenInfo> list, String origin, String embedder) { |
| 57 list.add(new KeygenInfo(origin, embedder, false)); |
| 58 } |
| 59 |
| 60 /** |
45 * @return the list of all origins that have geolocation permissions in non-
incognito mode. | 61 * @return the list of all origins that have geolocation permissions in non-
incognito mode. |
46 */ | 62 */ |
47 @SuppressWarnings("unchecked") | 63 @SuppressWarnings("unchecked") |
48 public static List<GeolocationInfo> getGeolocationInfo() { | 64 public static List<GeolocationInfo> getGeolocationInfo() { |
49 // Location can be managed by the custodian of a supervised account or b
y enterprise policy. | 65 // Location can be managed by the custodian of a supervised account or b
y enterprise policy. |
50 boolean managedOnly = !PrefServiceBridge.getInstance().isAllowLocationUs
erModifiable(); | 66 boolean managedOnly = !PrefServiceBridge.getInstance().isAllowLocationUs
erModifiable(); |
51 ArrayList<GeolocationInfo> list = new ArrayList<GeolocationInfo>(); | 67 ArrayList<GeolocationInfo> list = new ArrayList<GeolocationInfo>(); |
52 nativeGetGeolocationOrigins(list, managedOnly); | 68 nativeGetGeolocationOrigins(list, managedOnly); |
53 return list; | 69 return list; |
54 } | 70 } |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 private static void insertFullscreenInfoIntoList( | 256 private static void insertFullscreenInfoIntoList( |
241 ArrayList<FullscreenInfo> list, String origin, String embedder) { | 257 ArrayList<FullscreenInfo> list, String origin, String embedder) { |
242 list.add(new FullscreenInfo(origin, embedder, false)); | 258 list.add(new FullscreenInfo(origin, embedder, false)); |
243 } | 259 } |
244 | 260 |
245 private static native void nativeGetGeolocationOrigins(Object list, boolean
managedOnly); | 261 private static native void nativeGetGeolocationOrigins(Object list, boolean
managedOnly); |
246 static native int nativeGetGeolocationSettingForOrigin( | 262 static native int nativeGetGeolocationSettingForOrigin( |
247 String origin, String embedder, boolean isIncognito); | 263 String origin, String embedder, boolean isIncognito); |
248 public static native void nativeSetGeolocationSettingForOrigin( | 264 public static native void nativeSetGeolocationSettingForOrigin( |
249 String origin, String embedder, int value, boolean isIncognito); | 265 String origin, String embedder, int value, boolean isIncognito); |
| 266 private static native void nativeGetKeygenOrigins(Object list); |
| 267 static native int nativeGetKeygenSettingForOrigin( |
| 268 String origin, String embedder, boolean isIncognito); |
| 269 static native void nativeSetKeygenSettingForOrigin( |
| 270 String origin, String embedder, int value, boolean isIncognito); |
250 private static native void nativeGetMidiOrigins(Object list); | 271 private static native void nativeGetMidiOrigins(Object list); |
251 static native int nativeGetMidiSettingForOrigin( | 272 static native int nativeGetMidiSettingForOrigin( |
252 String origin, String embedder, boolean isIncognito); | 273 String origin, String embedder, boolean isIncognito); |
253 static native void nativeSetMidiSettingForOrigin( | 274 static native void nativeSetMidiSettingForOrigin( |
254 String origin, String embedder, int value, boolean isIncognito); | 275 String origin, String embedder, int value, boolean isIncognito); |
255 private static native void nativeGetPushNotificationOrigins(Object list); | 276 private static native void nativeGetPushNotificationOrigins(Object list); |
256 static native int nativeGetPushNotificationSettingForOrigin( | 277 static native int nativeGetPushNotificationSettingForOrigin( |
257 String origin, String embedder, boolean isIncognito); | 278 String origin, String embedder, boolean isIncognito); |
258 static native void nativeSetPushNotificationSettingForOrigin( | 279 static native void nativeSetPushNotificationSettingForOrigin( |
259 String origin, String embedder, int value, boolean isIncognito); | 280 String origin, String embedder, int value, boolean isIncognito); |
(...skipping 23 matching lines...) Expand all Loading... |
283 private static native void nativeFetchLocalStorageInfo(Object callback); | 304 private static native void nativeFetchLocalStorageInfo(Object callback); |
284 private static native void nativeFetchStorageInfo(Object callback); | 305 private static native void nativeFetchStorageInfo(Object callback); |
285 static native boolean nativeIsContentSettingsPatternValid(String pattern); | 306 static native boolean nativeIsContentSettingsPatternValid(String pattern); |
286 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str
ing pattern); | 307 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str
ing pattern); |
287 private static native void nativeGetFullscreenOrigins(Object list, boolean m
anagedOnly); | 308 private static native void nativeGetFullscreenOrigins(Object list, boolean m
anagedOnly); |
288 static native int nativeGetFullscreenSettingForOrigin( | 309 static native int nativeGetFullscreenSettingForOrigin( |
289 String origin, String embedder, boolean isIncognito); | 310 String origin, String embedder, boolean isIncognito); |
290 static native void nativeSetFullscreenSettingForOrigin( | 311 static native void nativeSetFullscreenSettingForOrigin( |
291 String origin, String embedder, int value, boolean isIncognito); | 312 String origin, String embedder, int value, boolean isIncognito); |
292 } | 313 } |
OLD | NEW |