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

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

Issue 2107123002: Convert OSX Page Info Bubble to Material Design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 {
51 STYLE_DEFAULT = 0,
52 STYLE_GREEN,
53 STYLE_YELLOW,
54 STYLE_RED,
55 };
56
57 struct SecurityDescription {
58 // A one-line summary of the security state.
59 base::string16 summary;
60 // How to style the summary.
61 SecuritySummaryStyle summary_style;
62 // A short paragraph with more details about the state, and how
63 // the user should treat it.
64 base::string16 details;
65 };
66
47 // |CookieInfo| contains information about the cookies from a specific source. 67 // |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. 68 // A source can for example be a specific origin or an entire wildcard domain.
49 struct CookieInfo { 69 struct CookieInfo {
50 CookieInfo(); 70 CookieInfo();
51 71
52 // The number of allowed cookies. 72 // The number of allowed cookies.
53 int allowed; 73 int allowed;
54 // The number of blocked cookies. 74 // The number of blocked cookies.
55 int blocked; 75 int blocked;
56 76
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 struct IdentityInfo { 112 struct IdentityInfo {
93 IdentityInfo(); 113 IdentityInfo();
94 ~IdentityInfo(); 114 ~IdentityInfo();
95 115
96 // The site's identity: the certificate's Organization Name for sites with 116 // The site's identity: the certificate's Organization Name for sites with
97 // Extended Validation certificates, or the URL's hostname for all other 117 // Extended Validation certificates, or the URL's hostname for all other
98 // sites. 118 // sites.
99 std::string site_identity; 119 std::string site_identity;
100 // Status of the site's identity. 120 // Status of the site's identity.
101 WebsiteSettings::SiteIdentityStatus identity_status; 121 WebsiteSettings::SiteIdentityStatus identity_status;
102 // Helper to get the status text to display to the user. 122 // Helper to get security description info to display to the user.
123 std::unique_ptr<SecurityDescription> GetSecurityDescription() const;
124 // Deprecated method go get just the summary from GetSecurityDescription().
103 base::string16 GetSecuritySummary() const; 125 base::string16 GetSecuritySummary() const;
104 // Textual description of the site's identity status that is displayed to 126 // Helper to get the status text style (i.e. color).
felt 2016/06/30 05:39:24 This comment seems mismatched, it is not above a h
lgarron 2016/07/08 17:47:08 Woops, I deleted the old comment instead of a temp
105 // the user.
106 std::string identity_status_description; 127 std::string identity_status_description;
107 // The ID is the server certificate of a secure connection or 0. 128 // The ID is the server certificate of a secure connection or 0.
108 int cert_id; 129 int cert_id;
109 // Status of the site's connection. 130 // Status of the site's connection.
110 WebsiteSettings::SiteConnectionStatus connection_status; 131 WebsiteSettings::SiteConnectionStatus connection_status;
111 // Textual description of the site's connection status that is displayed to 132 // Textual description of the site's connection status that is displayed to
112 // the user. 133 // the user.
113 std::string connection_status_description; 134 std::string connection_status_description;
114 // Set when the user has explicitly bypassed an SSL error for this host and 135 // Set when the user has explicitly bypassed an SSL error for this host and
115 // has a flag set to remember ssl decisions (explicit flag or in the 136 // has a flag set to remember ssl decisions (explicit flag or in the
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 208
188 // Selects the tab with the given |tab_id|. 209 // Selects the tab with the given |tab_id|.
189 virtual void SetSelectedTab(TabId tab_id) = 0; 210 virtual void SetSelectedTab(TabId tab_id) = 0;
190 }; 211 };
191 212
192 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; 213 typedef WebsiteSettingsUI::CookieInfoList CookieInfoList;
193 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; 214 typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList;
194 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList; 215 typedef WebsiteSettingsUI::ChosenObjectInfoList ChosenObjectInfoList;
195 216
196 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ 217 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698