Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.h

Issue 2262223002: Material Page Info (all desktop): Introduce new strings and styling info for the security section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cookie string. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 26 matching lines...) Expand all
37 class WebsiteSettingsUI { 37 class WebsiteSettingsUI {
38 public: 38 public:
39 // The Website Settings UI contains several tabs. Each tab is associated with 39 // The Website Settings UI contains several tabs. Each tab is associated with
40 // a unique tab id. The enum |TabId| contains all the ids for the tabs. 40 // a unique tab id. The enum |TabId| contains all the ids for the tabs.
41 enum TabId { 41 enum TabId {
42 TAB_ID_PERMISSIONS = 0, 42 TAB_ID_PERMISSIONS = 0,
43 TAB_ID_CONNECTION, 43 TAB_ID_CONNECTION,
44 NUM_TAB_IDS, 44 NUM_TAB_IDS,
45 }; 45 };
46 46
47 // The security summary is styled depending on the security state. At the
48 // moment, the only styling we apply is color, but it could also include e.g.
49 // bolding.
50 enum SecuritySummaryStyle { STYLE_UNSTYLED = 0, STYLE_COLOR = 1 << 1 };
51
52 struct SecurityDescription {
53 // A one-line summary of the security state.
54 base::string16 summary;
55 // How to style the summary.
56 SecuritySummaryStyle summary_style;
57 // The color to use for the summary. Valid iff the STYLE_COLOR bit is set on
58 // summary_style.
59 SkColor summary_color;
60 // A short paragraph with more details about the state, and how
61 // the user should treat it.
62 base::string16 details;
63 };
64
47 // |CookieInfo| contains information about the cookies from a specific source. 65 // |CookieInfo| contains information about the cookies from a specific source.
48 // A source can for example be a specific origin or an entire wildcard domain. 66 // A source can for example be a specific origin or an entire wildcard domain.
49 struct CookieInfo { 67 struct CookieInfo {
50 CookieInfo(); 68 CookieInfo();
51 69
52 // The number of allowed cookies. 70 // The number of allowed cookies.
53 int allowed; 71 int allowed;
54 // The number of blocked cookies. 72 // The number of blocked cookies.
55 int blocked; 73 int blocked;
56 74
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 struct IdentityInfo { 110 struct IdentityInfo {
93 IdentityInfo(); 111 IdentityInfo();
94 ~IdentityInfo(); 112 ~IdentityInfo();
95 113
96 // The site's identity: the certificate's Organization Name for sites with 114 // The site's identity: the certificate's Organization Name for sites with
97 // Extended Validation certificates, or the URL's hostname for all other 115 // Extended Validation certificates, or the URL's hostname for all other
98 // sites. 116 // sites.
99 std::string site_identity; 117 std::string site_identity;
100 // Status of the site's identity. 118 // Status of the site's identity.
101 WebsiteSettings::SiteIdentityStatus identity_status; 119 WebsiteSettings::SiteIdentityStatus identity_status;
102 // Helper to get the status text to display to the user. 120 // Helper to get security description info to display to the user.
121 std::unique_ptr<SecurityDescription> GetSecurityDescription() const;
122 // Deprecated method go get just the summary from GetSecurityDescription().
felt 2016/08/23 15:51:07 nit: grammar
103 base::string16 GetSecuritySummary() const; 123 base::string16 GetSecuritySummary() const;
felt 2016/08/23 15:51:07 will GetSecuritySummary() be removed in a follow u
104 // Textual description of the site's identity status that is displayed to 124 // Textual description of the site's identity status that is displayed to
105 // the user. 125 // the user.
106 std::string identity_status_description; 126 std::string identity_status_description;
107 // The ID is the server certificate of a secure connection or 0. 127 // The ID is the server certificate of a secure connection or 0.
108 int cert_id; 128 int cert_id;
109 // Status of the site's connection. 129 // Status of the site's connection.
110 WebsiteSettings::SiteConnectionStatus connection_status; 130 WebsiteSettings::SiteConnectionStatus connection_status;
111 // Textual description of the site's connection status that is displayed to 131 // Textual description of the site's connection status that is displayed to
112 // the user. 132 // the user.
113 std::string connection_status_description; 133 std::string connection_status_description;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 207
188 // Selects the tab with the given |tab_id|. 208 // Selects the tab with the given |tab_id|.
189 virtual void SetSelectedTab(TabId tab_id) = 0; 209 virtual void SetSelectedTab(TabId tab_id) = 0;
190 }; 210 };
191 211
192 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; 212 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList;
193 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; 213 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList;
194 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; 214 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList;
195 215
196 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ 216 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698