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

Unified 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: Explicitly mention that the colors are fixed due to a light background, and rename semantically. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/website_settings/website_settings_ui.h
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.h b/chrome/browser/ui/website_settings/website_settings_ui.h
index 2a6918e2d6478795400d24bdbc5a113e022e3294..7f7113a8972362a86abe2267b17e4045372c6966 100644
--- a/chrome/browser/ui/website_settings/website_settings_ui.h
+++ b/chrome/browser/ui/website_settings/website_settings_ui.h
@@ -44,6 +44,24 @@ class WebsiteSettingsUI {
NUM_TAB_IDS,
};
+ // The security summary is styled depending on the security state. At the
+ // moment, the only styling we apply is color, but it could also include e.g.
+ // bolding.
+ enum SecuritySummaryStyle { STYLE_UNSTYLED = 0, STYLE_COLOR = 1 << 1 };
+
+ struct SecurityDescription {
+ // A one-line summary of the security state.
+ base::string16 summary;
+ // How to style the summary.
+ SecuritySummaryStyle summary_style;
+ // The color to use for the summary. Valid iff the STYLE_COLOR bit is set on
+ // summary_style.
+ SkColor summary_color;
+ // A short paragraph with more details about the state, and how
+ // the user should treat it.
+ base::string16 details;
+ };
+
// |CookieInfo| contains information about the cookies from a specific source.
// A source can for example be a specific origin or an entire wildcard domain.
struct CookieInfo {
@@ -99,7 +117,9 @@ class WebsiteSettingsUI {
std::string site_identity;
// Status of the site's identity.
WebsiteSettings::SiteIdentityStatus identity_status;
- // Helper to get the status text to display to the user.
+ // Helper to get security description info to display to the user.
+ std::unique_ptr<SecurityDescription> GetSecurityDescription() const;
+ // Deprecated method go get just the summary from GetSecurityDescription().
base::string16 GetSecuritySummary() const;
// Textual description of the site's identity status that is displayed to
// the user.

Powered by Google App Engine
This is Rietveld 408576698