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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java

Issue 1929983002: Site Settings: Add Autoplay as a permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index faff43e8edccc80c3b32112da20a97ade07c4d57..407addf1d4a0aba7a3e1d49dc8a4dde98143f6db 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -257,6 +257,13 @@ public final class PrefServiceBridge {
return null;
}
+ /**
+ * @return whether autoplay is enabled.
+ */
+ public boolean isAutoplayEnabled() {
+ return nativeGetAutoplayEnabled();
+ }
+
public boolean isAcceptCookiesEnabled() {
return nativeGetAcceptCookiesEnabled();
}
@@ -808,6 +815,10 @@ public final class PrefServiceBridge {
nativeSetAllowCookiesEnabled(allow);
}
+ public void setAutoplayEnabled(boolean allow) {
+ nativeSetAutoplayEnabled(allow);
+ }
+
public void setBlockThirdPartyCookiesEnabled(boolean enabled) {
nativeSetBlockThirdPartyCookiesEnabled(enabled);
}
@@ -1051,6 +1062,7 @@ public final class PrefServiceBridge {
private native boolean nativeGetAcceptCookiesEnabled();
private native boolean nativeGetAcceptCookiesManaged();
+ private native boolean nativeGetAutoplayEnabled();
private native boolean nativeGetBackgroundSyncEnabled();
private native boolean nativeGetBlockThirdPartyCookiesEnabled();
private native boolean nativeGetBlockThirdPartyCookiesManaged();
@@ -1100,6 +1112,7 @@ public final class PrefServiceBridge {
OtherFormsOfBrowsingHistoryListener listener);
private native boolean nativeCanDeleteBrowsingHistory();
private static native void nativeFetchImportantSites(ImportantSitesCallback callback);
+ private native void nativeSetAutoplayEnabled(boolean allow);
private native void nativeSetAllowCookiesEnabled(boolean allow);
private native void nativeSetBackgroundSyncEnabled(boolean allow);
private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled);

Powered by Google App Engine
This is Rietveld 408576698