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.Callback; | 7 import org.chromium.base.Callback; |
8 import org.chromium.base.annotations.CalledByNative; | 8 import org.chromium.base.annotations.CalledByNative; |
9 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | 9 import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
10 | 10 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return nativeGetDSEGeolocationSetting(); | 233 return nativeGetDSEGeolocationSetting(); |
234 } | 234 } |
235 | 235 |
236 /** | 236 /** |
237 * Sets the DSE (Default Search Engine) geolocation setting. | 237 * Sets the DSE (Default Search Engine) geolocation setting. |
238 */ | 238 */ |
239 public static void setDSEGeolocationSetting(boolean setting) { | 239 public static void setDSEGeolocationSetting(boolean setting) { |
240 nativeSetDSEGeolocationSetting(setting); | 240 nativeSetDSEGeolocationSetting(setting); |
241 } | 241 } |
242 | 242 |
| 243 /** |
| 244 * Returns whether this origin is activated for subresource filtering, and w
ill have |
| 245 * resources filtered unless they are explicitly allowed via a permission. |
| 246 */ |
| 247 public static boolean getSubresourceFilterActivated(String origin) { |
| 248 return nativeGetSubresourceFilterActivated(origin); |
| 249 } |
| 250 |
243 private static native void nativeGetGeolocationOrigins(Object list, boolean
managedOnly); | 251 private static native void nativeGetGeolocationOrigins(Object list, boolean
managedOnly); |
244 static native int nativeGetGeolocationSettingForOrigin( | 252 static native int nativeGetGeolocationSettingForOrigin( |
245 String origin, String embedder, boolean isIncognito); | 253 String origin, String embedder, boolean isIncognito); |
246 public static native void nativeSetGeolocationSettingForOrigin( | 254 public static native void nativeSetGeolocationSettingForOrigin( |
247 String origin, String embedder, int value, boolean isIncognito); | 255 String origin, String embedder, int value, boolean isIncognito); |
248 private static native void nativeGetMidiOrigins(Object list); | 256 private static native void nativeGetMidiOrigins(Object list); |
249 static native int nativeGetMidiSettingForOrigin( | 257 static native int nativeGetMidiSettingForOrigin( |
250 String origin, String embedder, boolean isIncognito); | 258 String origin, String embedder, boolean isIncognito); |
251 static native void nativeSetMidiSettingForOrigin( | 259 static native void nativeSetMidiSettingForOrigin( |
252 String origin, String embedder, int value, boolean isIncognito); | 260 String origin, String embedder, int value, boolean isIncognito); |
(...skipping 24 matching lines...) Expand all Loading... |
277 private static native void nativeFetchStorageInfo(Object callback); | 285 private static native void nativeFetchStorageInfo(Object callback); |
278 static native boolean nativeIsContentSettingsPatternValid(String pattern); | 286 static native boolean nativeIsContentSettingsPatternValid(String pattern); |
279 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str
ing pattern); | 287 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str
ing pattern); |
280 static native void nativeGetUsbOrigins(Object list); | 288 static native void nativeGetUsbOrigins(Object list); |
281 static native void nativeRevokeUsbPermission(String origin, String embedder,
String object); | 289 static native void nativeRevokeUsbPermission(String origin, String embedder,
String object); |
282 static native void nativeClearBannerData(String origin); | 290 static native void nativeClearBannerData(String origin); |
283 private static native boolean nativeShouldUseDSEGeolocationSetting( | 291 private static native boolean nativeShouldUseDSEGeolocationSetting( |
284 String origin, boolean isIncognito); | 292 String origin, boolean isIncognito); |
285 private static native boolean nativeGetDSEGeolocationSetting(); | 293 private static native boolean nativeGetDSEGeolocationSetting(); |
286 private static native void nativeSetDSEGeolocationSetting(boolean setting); | 294 private static native void nativeSetDSEGeolocationSetting(boolean setting); |
| 295 private static native boolean nativeGetSubresourceFilterActivated(String ori
gin); |
287 } | 296 } |
OLD | NEW |