Chromium Code Reviews| 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_WEBSITE_SETTINGS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_UI_H_ | 6 #define CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_UI_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "chrome/browser/ui/page_info/website_settings.h" | 13 #include "chrome/browser/ui/page_info/website_settings.h" |
| 14 #include "components/content_settings/core/common/content_settings.h" | 14 #include "components/content_settings/core/common/content_settings.h" |
| 15 #include "components/content_settings/core/common/content_settings_types.h" | 15 #include "components/content_settings/core/common/content_settings_types.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
|
dominickn
2017/03/26 23:46:24
class GURL;
Patti Lor
2017/03/27 05:52:40
Done.
| |
| 19 class WebsiteSettings; | 19 class WebsiteSettings; |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Image; | 22 class Image; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 class X509Certificate; | 26 class X509Certificate; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 // including why that action was taken. E.g. "Allowed by you", | 148 // including why that action was taken. E.g. "Allowed by you", |
| 149 // "Blocked by default". If |setting| is default, specify the actual default | 149 // "Blocked by default". If |setting| is default, specify the actual default |
| 150 // setting using |default_setting|. | 150 // setting using |default_setting|. |
| 151 static base::string16 PermissionActionToUIString( | 151 static base::string16 PermissionActionToUIString( |
| 152 Profile* profile, | 152 Profile* profile, |
| 153 ContentSettingsType type, | 153 ContentSettingsType type, |
| 154 ContentSetting setting, | 154 ContentSetting setting, |
| 155 ContentSetting default_setting, | 155 ContentSetting default_setting, |
| 156 content_settings::SettingSource source); | 156 content_settings::SettingSource source); |
| 157 | 157 |
| 158 // Returns a string indicating whether the permission was blocked via an | |
| 159 // extension, enterprise policy, or embargo. | |
| 160 static base::string16 PermissionDecisionReasonToString( | |
|
dominickn
2017/03/26 23:46:24
ToUIString for consistency?
Patti Lor
2017/03/27 05:52:40
Done.
| |
| 161 Profile* profile, | |
| 162 const PermissionInfo& permission, | |
| 163 const GURL& url); | |
| 164 | |
| 158 // Returns the icon resource ID for the given permission |type| and |setting|. | 165 // Returns the icon resource ID for the given permission |type| and |setting|. |
| 159 static int GetPermissionIconID(ContentSettingsType type, | 166 static int GetPermissionIconID(ContentSettingsType type, |
| 160 ContentSetting setting); | 167 ContentSetting setting); |
| 161 | 168 |
| 162 // Returns the icon for the given permissionInfo |info|. If |info|'s current | 169 // Returns the icon for the given permissionInfo |info|. If |info|'s current |
| 163 // setting is CONTENT_SETTING_DEFAULT, it will return the icon for |info|'s | 170 // setting is CONTENT_SETTING_DEFAULT, it will return the icon for |info|'s |
| 164 // default setting. | 171 // default setting. |
| 165 static const gfx::Image& GetPermissionIcon(const PermissionInfo& info); | 172 static const gfx::Image& GetPermissionIcon(const PermissionInfo& info); |
| 166 | 173 |
| 167 // Returns the UI string describing the given object |info|. | 174 // Returns the UI string describing the given object |info|. |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 196 | 203 |
| 197 // Sets site identity information. | 204 // Sets site identity information. |
| 198 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; | 205 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; |
| 199 }; | 206 }; |
| 200 | 207 |
| 201 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; | 208 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; |
| 202 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; | 209 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; |
| 203 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; | 210 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; |
| 204 | 211 |
| 205 #endif // CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_UI_H_ | 212 #endif // CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_UI_H_ |
| OLD | NEW |