Chromium Code Reviews| 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 b212acb7b5d583907969541919b8252b818e25e3..3fecf9b0e6f9996949a6619aaaf54f0ccf77147c 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 |
| @@ -167,6 +167,14 @@ public class Website implements Serializable { |
| R.string.website_settings_category_ask_before_accessing; |
| entry.customDisabledSummary = R.string.website_settings_category_block_all; |
| return entry; |
| + case ContentSettingsType.CONTENT_SETTINGS_TYPE_IMAGES: |
| + entry = new PermissionDataEntry(); |
| + entry.iconResourceId = R.drawable.permission_images; |
| + entry.titleResourceId = R.string.images_permission_title; |
| + entry.explanationResourceId = R.string.images_permission_title; |
| + entry.defaultEnabledValue = ContentSetting.ALLOW; |
| + entry.defaultDisabledValue = ContentSetting.BLOCK; |
| + return entry; |
| case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
| entry = new PermissionDataEntry(); |
| entry.iconResourceId = R.drawable.permission_media; |
| @@ -232,8 +240,9 @@ public class Website implements Serializable { |
| private CookieInfo mCookieInfo; |
| private GeolocationInfo mGeolocationInfo; |
| private MidiInfo mMidiInfo; |
| - private JavaScriptExceptionInfo mJavaScriptExceptionInfo; |
| - private PopupExceptionInfo mPopupExceptionInfo; |
| + private ContentSettingExceptionInfo mImagesExceptionInfo; |
| + private ContentSettingExceptionInfo mJavaScriptExceptionInfo; |
| + private ContentSettingExceptionInfo mPopupExceptionInfo; |
| private ProtectedMediaIdentifierInfo mProtectedMediaIdentifierInfo; |
| private PushNotificationInfo mPushNotificationInfo; |
| private VoiceAndVideoCaptureInfo mVoiceAndVideoCaptureInfo; |
| @@ -366,6 +375,29 @@ public class Website implements Serializable { |
| } |
| /** |
| + * Returns what permission governs Images access. |
| + */ |
| + public ContentSetting getImagesPermission() { |
| + return mImagesExceptionInfo != null ? mImagesExceptionInfo.getContentSetting() : null; |
| + } |
| + |
| + /** |
| + * Configure Images permission access setting for this site. |
| + */ |
| + public void setImagesPermission(ContentSetting value) { |
| + if (mImagesExceptionInfo != null) { |
| + mImagesExceptionInfo.setContentSetting(value); |
| + } |
| + } |
| + |
| + /** |
| + * Sets the Images exception info for this Website. |
| + */ |
| + public void setImagesInfo(ContentSettingExceptionInfo info) { |
|
newt (away)
2015/04/10 18:46:49
I'd call this setImagesException(), similarly for
Finnur
2015/04/13 12:59:32
Done.
|
| + mImagesExceptionInfo = info; |
| + } |
| + |
| + /** |
| * Returns what permission governs JavaScript access. |
| */ |
| public ContentSetting getJavaScriptPermission() { |
| @@ -385,18 +417,18 @@ public class Website implements Serializable { |
| /** |
| * Sets the JavaScript exception info for this Website. |
| */ |
| - public void setJavaScriptExceptionInfo(JavaScriptExceptionInfo info) { |
| + public void setJavaScriptExceptionInfo(ContentSettingExceptionInfo info) { |
| mJavaScriptExceptionInfo = info; |
| } |
| /** |
| * Sets the Popup exception info for this Website. |
| */ |
| - public void setPopupExceptionInfo(PopupExceptionInfo info) { |
| + public void setPopupExceptionInfo(ContentSettingExceptionInfo info) { |
| mPopupExceptionInfo = info; |
| } |
| - public PopupExceptionInfo getPopupExceptionInfo() { |
| + public ContentSettingExceptionInfo getPopupExceptionInfo() { |
| return mPopupExceptionInfo; |
| } |