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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // The global default settings for this permission |type|. | 67 // The global default settings for this permission |type|. |
68 ContentSetting default_setting; | 68 ContentSetting default_setting; |
69 // The settings source e.g. user, extensions, policy, ... . | 69 // The settings source e.g. user, extensions, policy, ... . |
70 content_settings::SettingSource source; | 70 content_settings::SettingSource source; |
71 }; | 71 }; |
72 | 72 |
73 // |IdentityInfo| contains information about the site's identity and | 73 // |IdentityInfo| contains information about the site's identity and |
74 // connection. | 74 // connection. |
75 struct IdentityInfo { | 75 struct IdentityInfo { |
76 IdentityInfo(); | 76 IdentityInfo(); |
| 77 ~IdentityInfo(); |
77 | 78 |
78 // The site's identity. | 79 // The site's identity. |
79 std::string site_identity; | 80 std::string site_identity; |
80 // Status of the site's identity. | 81 // Status of the site's identity. |
81 WebsiteSettings::SiteIdentityStatus identity_status; | 82 WebsiteSettings::SiteIdentityStatus identity_status; |
82 // Helper to get the status text to display to the user. | 83 // Helper to get the status text to display to the user. |
83 string16 GetIdentityStatusText() const; | 84 string16 GetIdentityStatusText() const; |
84 // Textual description of the site's identity status that is displayed to | 85 // Textual description of the site's identity status that is displayed to |
85 // the user. | 86 // the user. |
86 std::string identity_status_description; | 87 std::string identity_status_description; |
87 // The ID is the server certificate of a secure connection or 0. | 88 // The ID is the server certificate of a secure connection or 0. |
88 int cert_id; | 89 int cert_id; |
89 // Status of the site's connection. | 90 // Status of the site's connection. |
90 WebsiteSettings::SiteConnectionStatus connection_status; | 91 WebsiteSettings::SiteConnectionStatus connection_status; |
91 // Textual description of the site's connection status that is displayed to | 92 // Textual description of the site's connection status that is displayed to |
92 // the user. | 93 // the user. |
93 std::string connection_status_description; | 94 std::string connection_status_description; |
| 95 |
| 96 WebsiteSettings::CertTransparencyStatus cert_transparency_status; |
| 97 // Textual description of the site's Certificate Transparency status (if |
| 98 // a secure connection). |
| 99 std::string cert_transparency_description; |
94 }; | 100 }; |
95 | 101 |
96 typedef std::vector<CookieInfo> CookieInfoList; | 102 typedef std::vector<CookieInfo> CookieInfoList; |
97 typedef std::vector<PermissionInfo> PermissionInfoList; | 103 typedef std::vector<PermissionInfo> PermissionInfoList; |
98 | 104 |
99 virtual ~WebsiteSettingsUI(); | 105 virtual ~WebsiteSettingsUI(); |
100 | 106 |
101 // Returns the UI string for the given permission |type|. | 107 // Returns the UI string for the given permission |type|. |
102 static string16 PermissionTypeToUIString(ContentSettingsType type); | 108 static string16 PermissionTypeToUIString(ContentSettingsType type); |
103 | 109 |
(...skipping 29 matching lines...) Expand all Loading... |
133 static int GetConnectionIconID( | 139 static int GetConnectionIconID( |
134 WebsiteSettings::SiteConnectionStatus status); | 140 WebsiteSettings::SiteConnectionStatus status); |
135 | 141 |
136 // Returns the connection icon for the given connection |status|. | 142 // Returns the connection icon for the given connection |status|. |
137 static const gfx::Image& GetConnectionIcon( | 143 static const gfx::Image& GetConnectionIcon( |
138 WebsiteSettings::SiteConnectionStatus status); | 144 WebsiteSettings::SiteConnectionStatus status); |
139 | 145 |
140 // Returns the icon ID to show along with the first visit information. | 146 // Returns the icon ID to show along with the first visit information. |
141 static int GetFirstVisitIconID(const string16& first_visit); | 147 static int GetFirstVisitIconID(const string16& first_visit); |
142 | 148 |
| 149 // Returns the icon to show along with the Certificate Transparency |
| 150 // information. |
| 151 static const gfx::Image& GetCertTransparencyIcon( |
| 152 WebsiteSettings::CertTransparencyStatus status); |
| 153 |
143 // Returns the icon to show along with the first visit information. | 154 // Returns the icon to show along with the first visit information. |
144 static const gfx::Image& GetFirstVisitIcon(const string16& first_visit); | 155 static const gfx::Image& GetFirstVisitIcon(const string16& first_visit); |
145 | 156 |
146 // Sets cookie information. | 157 // Sets cookie information. |
147 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0; | 158 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) = 0; |
148 | 159 |
149 // Sets permision information. | 160 // Sets permision information. |
150 virtual void SetPermissionInfo( | 161 virtual void SetPermissionInfo( |
151 const PermissionInfoList& permission_info_list) = 0; | 162 const PermissionInfoList& permission_info_list) = 0; |
152 | 163 |
153 // Sets site identity information. | 164 // Sets site identity information. |
154 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; | 165 virtual void SetIdentityInfo(const IdentityInfo& identity_info) = 0; |
155 | 166 |
156 // Sets the first visited data. |first_visit| can be an empty string. | 167 // Sets the first visited data. |first_visit| can be an empty string. |
157 virtual void SetFirstVisit(const string16& first_visit) = 0; | 168 virtual void SetFirstVisit(const string16& first_visit) = 0; |
158 | 169 |
159 // Selects the tab with the given |tab_id|. | 170 // Selects the tab with the given |tab_id|. |
160 virtual void SetSelectedTab(TabId tab_id) = 0; | 171 virtual void SetSelectedTab(TabId tab_id) = 0; |
161 }; | 172 }; |
162 | 173 |
163 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; | 174 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; |
164 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; | 175 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; |
165 | 176 |
166 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ | 177 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ |
OLD | NEW |