| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class WebsiteSettingsUI { | 41 class WebsiteSettingsUI { |
| 42 public: | 42 public: |
| 43 // The Website Settings UI contains several tabs. Each tab is associated with | 43 // The Website Settings UI contains several tabs. Each tab is associated with |
| 44 // a unique tab id. The enum |TabId| contains all the ids for the tabs. | 44 // a unique tab id. The enum |TabId| contains all the ids for the tabs. |
| 45 enum TabId { | 45 enum TabId { |
| 46 TAB_ID_PERMISSIONS = 0, | 46 TAB_ID_PERMISSIONS = 0, |
| 47 TAB_ID_CONNECTION, | 47 TAB_ID_CONNECTION, |
| 48 NUM_TAB_IDS, | 48 NUM_TAB_IDS, |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 // The security summary is styled depending on the security state. At the |
| 52 // moment, the only styling we apply is color, but it could also include e.g. |
| 53 // bolding. |
| 54 enum SecuritySummaryStyle { STYLE_UNSTYLED = 0, STYLE_COLOR = 1 << 1 }; |
| 55 |
| 56 struct SecurityDescription { |
| 57 // A one-line summary of the security state. |
| 58 base::string16 summary; |
| 59 // A short paragraph with more details about the state, and how |
| 60 // the user should treat it. |
| 61 base::string16 details; |
| 62 }; |
| 63 |
| 51 // |CookieInfo| contains information about the cookies from a specific source. | 64 // |CookieInfo| contains information about the cookies from a specific source. |
| 52 // A source can for example be a specific origin or an entire wildcard domain. | 65 // A source can for example be a specific origin or an entire wildcard domain. |
| 53 struct CookieInfo { | 66 struct CookieInfo { |
| 54 CookieInfo(); | 67 CookieInfo(); |
| 55 | 68 |
| 56 // The number of allowed cookies. | 69 // The number of allowed cookies. |
| 57 int allowed; | 70 int allowed; |
| 58 // The number of blocked cookies. | 71 // The number of blocked cookies. |
| 59 int blocked; | 72 int blocked; |
| 60 | 73 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 struct IdentityInfo { | 109 struct IdentityInfo { |
| 97 IdentityInfo(); | 110 IdentityInfo(); |
| 98 ~IdentityInfo(); | 111 ~IdentityInfo(); |
| 99 | 112 |
| 100 // The site's identity: the certificate's Organization Name for sites with | 113 // The site's identity: the certificate's Organization Name for sites with |
| 101 // Extended Validation certificates, or the URL's hostname for all other | 114 // Extended Validation certificates, or the URL's hostname for all other |
| 102 // sites. | 115 // sites. |
| 103 std::string site_identity; | 116 std::string site_identity; |
| 104 // Status of the site's identity. | 117 // Status of the site's identity. |
| 105 WebsiteSettings::SiteIdentityStatus identity_status; | 118 WebsiteSettings::SiteIdentityStatus identity_status; |
| 106 // Helper to get the status text to display to the user. | 119 // Helper to get security description info to display to the user. |
| 120 std::unique_ptr<SecurityDescription> GetSecurityDescription() const; |
| 121 // Deprecated method go get just the summary from GetSecurityDescription(). |
| 107 base::string16 GetSecuritySummary() const; | 122 base::string16 GetSecuritySummary() const; |
| 108 // Textual description of the site's identity status that is displayed to | 123 // Textual description of the site's identity status that is displayed to |
| 109 // the user. | 124 // the user. |
| 110 std::string identity_status_description; | 125 std::string identity_status_description; |
| 111 // The server certificate if a secure connection. | 126 // The server certificate if a secure connection. |
| 112 scoped_refptr<net::X509Certificate> certificate; | 127 scoped_refptr<net::X509Certificate> certificate; |
| 113 // Status of the site's connection. | 128 // Status of the site's connection. |
| 114 WebsiteSettings::SiteConnectionStatus connection_status; | 129 WebsiteSettings::SiteConnectionStatus connection_status; |
| 115 // Textual description of the site's connection status that is displayed to | 130 // Textual description of the site's connection status that is displayed to |
| 116 // the user. | 131 // the user. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 206 |
| 192 // Selects the tab with the given |tab_id|. | 207 // Selects the tab with the given |tab_id|. |
| 193 virtual void SetSelectedTab(TabId tab_id) = 0; | 208 virtual void SetSelectedTab(TabId tab_id) = 0; |
| 194 }; | 209 }; |
| 195 | 210 |
| 196 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; | 211 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; |
| 197 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; | 212 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; |
| 198 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; | 213 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; |
| 199 | 214 |
| 200 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 215 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
| OLD | NEW |