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

Unified Diff: chrome/browser/ui/website_settings/website_settings_ui.h

Issue 2702923002: Page Info: Hide default permissions with a value of Ask if the default is Ask. (Closed)
Patch Set: Page Info: Add cross-platform logic to hide permissions with default values behind a button. Created 3 years, 10 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/browser/ui/website_settings/website_settings_ui.h
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.h b/chrome/browser/ui/website_settings/website_settings_ui.h
index a656ae571f47f267956fad5aafb91825919fcdc4..8e4a7522369a9149b105d7197c29b98fc172180c 100644
--- a/chrome/browser/ui/website_settings/website_settings_ui.h
+++ b/chrome/browser/ui/website_settings/website_settings_ui.h
@@ -43,6 +43,14 @@ class WebsiteSettingsUI {
NUM_TAB_IDS,
};
+ // A value that represents a what subset of permissions are shown. Thisis used
palmer 2017/02/24 01:55:02 Typo: "This is"
lgarron 2017/02/24 02:15:27 Fixed.
+ // to determine the behaviour of the permission button.
+ enum VisiblePermissions {
+ VISIBLE_PERMISSIONS_NONE,
+ VISIBLE_PERMISSIONS_SOME_BUT_NOT_ALL,
+ VISIBLE_PERMISSIONS_ALL,
+ };
+
// The security summary is styled depending on the security state. At the
// moment, the only styling we apply is color, but it could also include e.g.
// bolding.
@@ -155,6 +163,10 @@ class WebsiteSettingsUI {
ContentSetting default_setting,
content_settings::SettingSource source);
+ // Returns the UI string for the given permission |type|.
+ static base::string16 GetPermissionButtonString(
+ VisiblePermissions visible_permissions);
+
// Returns the icon resource ID for the given permission |type| and |setting|.
static int GetPermissionIconID(ContentSettingsType type,
ContentSetting setting);
@@ -194,6 +206,10 @@ class WebsiteSettingsUI {
const PermissionInfoList& permission_info_list,
ChosenObjectInfoList chosen_object_info_list) = 0;
+ // Sets permission button
+ virtual void UpdatePermissionButton(
+ VisiblePermissions visible_permissions) = 0;
+
// Sets site identity information.
virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698