| 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_PAGE_INFO_PAGE_INFO_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_UI_H_ |
| 6 #define CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_UI_H_ | 6 #define CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_UI_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 using CookieInfoList = std::vector<CookieInfo>; | 134 using CookieInfoList = std::vector<CookieInfo>; |
| 135 using PermissionInfoList = std::vector<PermissionInfo>; | 135 using PermissionInfoList = std::vector<PermissionInfo>; |
| 136 using ChosenObjectInfoList = std::vector<std::unique_ptr<ChosenObjectInfo>>; | 136 using ChosenObjectInfoList = std::vector<std::unique_ptr<ChosenObjectInfo>>; |
| 137 | 137 |
| 138 virtual ~PageInfoUI(); | 138 virtual ~PageInfoUI(); |
| 139 | 139 |
| 140 // Returns the UI string for the given permission |type|. | 140 // Returns the UI string for the given permission |type|. |
| 141 static base::string16 PermissionTypeToUIString(ContentSettingsType type); | 141 static base::string16 PermissionTypeToUIString(ContentSettingsType type); |
| 142 | 142 |
| 143 // Returns the UI string for the given permission |value|, used in the | |
| 144 // permission-changing menu. Generally this will be a verb in the imperative | |
| 145 // form, e.g. "ask", "allow", "block". | |
| 146 static base::string16 PermissionValueToUIString(ContentSetting value); | |
| 147 | |
| 148 // Returns the UI string describing the action taken for a permission, | 143 // Returns the UI string describing the action taken for a permission, |
| 149 // including why that action was taken. E.g. "Allowed by you", | 144 // including why that action was taken. E.g. "Allowed by you", |
| 150 // "Blocked by default". If |setting| is default, specify the actual default | 145 // "Blocked by default". If |setting| is default, specify the actual default |
| 151 // setting using |default_setting|. | 146 // setting using |default_setting|. |
| 152 static base::string16 PermissionActionToUIString( | 147 static base::string16 PermissionActionToUIString( |
| 153 Profile* profile, | 148 Profile* profile, |
| 154 ContentSettingsType type, | 149 ContentSettingsType type, |
| 155 ContentSetting setting, | 150 ContentSetting setting, |
| 156 ContentSetting default_setting, | 151 ContentSetting default_setting, |
| 157 content_settings::SettingSource source); | 152 content_settings::SettingSource source); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 200 |
| 206 // Sets site identity information. | 201 // Sets site identity information. |
| 207 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; | 202 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; |
| 208 }; | 203 }; |
| 209 | 204 |
| 210 typedef PageInfoUI::CookieInfoList CookieInfoList; | 205 typedef PageInfoUI::CookieInfoList CookieInfoList; |
| 211 typedef PageInfoUI::PermissionInfoList PermissionInfoList; | 206 typedef PageInfoUI::PermissionInfoList PermissionInfoList; |
| 212 typedef PageInfoUI::ChosenObjectInfoList ChosenObjectInfoList; | 207 typedef PageInfoUI::ChosenObjectInfoList ChosenObjectInfoList; |
| 213 | 208 |
| 214 #endif // CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_UI_H_ | 209 #endif // CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_UI_H_ |
| OLD | NEW |