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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.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/website/Website.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
index 09644bfdfb864df636b442fb608a86b0702457a1..f87160156676da16faf5134cf45e27f16e58658a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
@@ -27,6 +27,7 @@ public class Website implements Serializable {
private final String mTitle;
private String mSummary;
+ private ContentSettingException mAutoplayExceptionInfo;
private ContentSettingException mBackgroundSyncExceptionInfo;
private CameraInfo mCameraInfo;
private ContentSettingException mCookieException;
@@ -74,6 +75,29 @@ public class Website implements Serializable {
}
/**
+ * Returns what permission governs Autoplay access.
+ */
+ public ContentSetting getAutoplayPermission() {
+ return mAutoplayExceptionInfo != null ? mAutoplayExceptionInfo.getContentSetting() : null;
+ }
+
+ /**
+ * Configure Autoplay permission access setting for this site.
+ */
+ public void setAutoplayPermission(ContentSetting value) {
+ if (mAutoplayExceptionInfo != null) {
+ mAutoplayExceptionInfo.setContentSetting(value);
+ }
+ }
+
+ /**
+ * Sets the Autoplay exception info for this Website.
+ */
+ public void setAutoplayException(ContentSettingException exception) {
+ mAutoplayExceptionInfo = exception;
+ }
+
+ /**
* Sets the background sync setting exception info for this website.
*/
public void setBackgroundSyncException(ContentSettingException exception) {

Powered by Google App Engine
This is Rietveld 408576698