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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.h

Issue 10831128: (Views only) Disable drop-down buttons in the website settings popup for managed permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // the current website. 51 // the current website.
52 struct PermissionInfo { 52 struct PermissionInfo {
53 PermissionInfo(); 53 PermissionInfo();
54 54
55 // Site permission |type|. 55 // Site permission |type|.
56 ContentSettingsType type; 56 ContentSettingsType type;
57 // The current value for the permission |type| (e.g. ALLOW or BLOCK). 57 // The current value for the permission |type| (e.g. ALLOW or BLOCK).
58 ContentSetting setting; 58 ContentSetting setting;
59 // The global default settings for this permission |type|. 59 // The global default settings for this permission |type|.
60 ContentSetting default_setting; 60 ContentSetting default_setting;
61 // The settings source e.g. user, extensions, policy, ... .
62 content_settings::SettingSource source;
61 }; 63 };
62 64
63 // |IdentityInfo| contains information about the site's identity and 65 // |IdentityInfo| contains information about the site's identity and
64 // connection. 66 // connection.
65 struct IdentityInfo { 67 struct IdentityInfo {
66 IdentityInfo(); 68 IdentityInfo();
67 69
68 // The site's identity. 70 // The site's identity.
69 std::string site_identity; 71 std::string site_identity;
70 // Status of the site's identity. 72 // Status of the site's identity.
(...skipping 21 matching lines...) Expand all
92 static string16 PermissionTypeToUIString(ContentSettingsType type); 94 static string16 PermissionTypeToUIString(ContentSettingsType type);
93 95
94 // Returns the UI string for the given permission |value|, used in the 96 // Returns the UI string for the given permission |value|, used in the
95 // permission-changing menu. Generally this will be a verb in the imperative 97 // permission-changing menu. Generally this will be a verb in the imperative
96 // form, e.g. "ask", "allow", "block". 98 // form, e.g. "ask", "allow", "block".
97 static string16 PermissionValueToUIString(ContentSetting value); 99 static string16 PermissionValueToUIString(ContentSetting value);
98 100
99 // Returns the UI string describing the action taken for a permission, 101 // Returns the UI string describing the action taken for a permission,
100 // including why that action was taken. E.g. "Allowed by you", 102 // including why that action was taken. E.g. "Allowed by you",
101 // "Blocked by default". 103 // "Blocked by default".
102 static string16 PermissionActionToUIString(ContentSetting setting, 104 static string16 PermissionActionToUIString(
103 ContentSetting default_setting); 105 ContentSetting setting,
106 ContentSetting default_setting,
107 content_settings::SettingSource source);
104 108
105 // Returns the icon for the given permission |type| and |setting|. 109 // Returns the icon for the given permission |type| and |setting|.
106 static const gfx::Image& GetPermissionIcon(ContentSettingsType type, 110 static const gfx::Image& GetPermissionIcon(ContentSettingsType type,
107 ContentSetting setting); 111 ContentSetting setting);
108 112
109 // Returns the identity icon for the given identity |status|. 113 // Returns the identity icon for the given identity |status|.
110 static const gfx::Image& GetIdentityIcon( 114 static const gfx::Image& GetIdentityIcon(
111 WebsiteSettings::SiteIdentityStatus status); 115 WebsiteSettings::SiteIdentityStatus status);
112 116
113 // Returns the connection icon for the given connection |status|. 117 // Returns the connection icon for the given connection |status|.
(...skipping 14 matching lines...) Expand all
128 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; 132 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0;
129 133
130 // Sets the first visited data. |first_visit| can be an empty string. 134 // Sets the first visited data. |first_visit| can be an empty string.
131 virtual void SetFirstVisit(const string16& first_visit) = 0; 135 virtual void SetFirstVisit(const string16& first_visit) = 0;
132 }; 136 };
133 137
134 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; 138 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList;
135 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; 139 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList;
136 140
137 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ 141 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698