OLD | NEW |
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 static string16 PermissionValueToUIString(ContentSetting value); | 107 static string16 PermissionValueToUIString(ContentSetting value); |
108 | 108 |
109 // Returns the UI string describing the action taken for a permission, | 109 // Returns the UI string describing the action taken for a permission, |
110 // including why that action was taken. E.g. "Allowed by you", | 110 // including why that action was taken. E.g. "Allowed by you", |
111 // "Blocked by default". | 111 // "Blocked by default". |
112 static string16 PermissionActionToUIString( | 112 static string16 PermissionActionToUIString( |
113 ContentSetting setting, | 113 ContentSetting setting, |
114 ContentSetting default_setting, | 114 ContentSetting default_setting, |
115 content_settings::SettingSource source); | 115 content_settings::SettingSource source); |
116 | 116 |
| 117 // Returns the icon resource ID for the given permission |type| and |setting|. |
| 118 static int GetPermissionIconID(ContentSettingsType type, |
| 119 ContentSetting setting); |
| 120 |
117 // Returns the icon for the given permission |type| and |setting|. | 121 // Returns the icon for the given permission |type| and |setting|. |
118 static const gfx::Image& GetPermissionIcon(ContentSettingsType type, | 122 static const gfx::Image& GetPermissionIcon(ContentSettingsType type, |
119 ContentSetting setting); | 123 ContentSetting setting); |
120 | 124 |
| 125 // Returns the identity icon ID for the given identity |status|. |
| 126 static int GetIdentityIconID(WebsiteSettings::SiteIdentityStatus status); |
| 127 |
121 // Returns the identity icon for the given identity |status|. | 128 // Returns the identity icon for the given identity |status|. |
122 static const gfx::Image& GetIdentityIcon( | 129 static const gfx::Image& GetIdentityIcon( |
123 WebsiteSettings::SiteIdentityStatus status); | 130 WebsiteSettings::SiteIdentityStatus status); |
124 | 131 |
| 132 // Returns the connection icon ID for the given connection |status|. |
| 133 static int GetConnectionIconID( |
| 134 WebsiteSettings::SiteConnectionStatus status); |
| 135 |
125 // Returns the connection icon for the given connection |status|. | 136 // Returns the connection icon for the given connection |status|. |
126 static const gfx::Image& GetConnectionIcon( | 137 static const gfx::Image& GetConnectionIcon( |
127 WebsiteSettings::SiteConnectionStatus status); | 138 WebsiteSettings::SiteConnectionStatus status); |
128 | 139 |
| 140 // Returns the icon ID to show along with the first visit information. |
| 141 static int GetFirstVisitIconID(const string16& first_visit); |
| 142 |
129 // Returns the icon to show along with the first visit information. | 143 // Returns the icon to show along with the first visit information. |
130 static const gfx::Image& GetFirstVisitIcon(const string16& first_visit); | 144 static const gfx::Image& GetFirstVisitIcon(const string16& first_visit); |
131 | 145 |
132 // Sets cookie information. | 146 // Sets cookie information. |
133 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0; | 147 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0; |
134 | 148 |
135 // Sets permision information. | 149 // Sets permision information. |
136 virtual void SetPermissionInfo( | 150 virtual void SetPermissionInfo( |
137 const PermissionInfoList& permission_info_list) = 0; | 151 const PermissionInfoList& permission_info_list) = 0; |
138 | 152 |
139 // Sets site identity information. | 153 // Sets site identity information. |
140 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; | 154 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; |
141 | 155 |
142 // Sets the first visited data. |first_visit| can be an empty string. | 156 // Sets the first visited data. |first_visit| can be an empty string. |
143 virtual void SetFirstVisit(const string16& first_visit) = 0; | 157 virtual void SetFirstVisit(const string16& first_visit) = 0; |
144 | 158 |
145 // Selects the tab with the given |tab_id|. | 159 // Selects the tab with the given |tab_id|. |
146 virtual void SetSelectedTab(TabId tab_id) = 0; | 160 virtual void SetSelectedTab(TabId tab_id) = 0; |
147 }; | 161 }; |
148 | 162 |
149 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; | 163 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; |
150 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; | 164 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; |
151 | 165 |
152 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 166 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
OLD | NEW |