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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 2144903004: New location security strings and animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't animate if level is same 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/views/location_bar/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index dea93ce21b77d5c7560620f7530fbe541146854a..0962f6b8f4d3bf6b944b0bfe224a4cac5fb05159 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -109,7 +109,7 @@ class LocationBarView : public LocationBar,
TEXT,
SELECTED_TEXT,
DEEMPHASIZED_TEXT,
- EV_BUBBLE_TEXT_AND_BORDER,
+ SECURITY_CHIP_TEXT_AND_BORDER,
Peter Kasting 2016/08/20 01:16:43 Nit: MD no longer puts a border around this, so mi
Kevin Bailey 2016/08/22 15:58:56 Done, but to avoid having to follow a fickle UI, p
Peter Kasting 2016/08/22 22:58:09 I think leaving TEXT is good. If that wasn't ther
};
// The location bar view's class name.
@@ -318,9 +318,15 @@ class LocationBarView : public LocationBar,
// Returns true if the suggest text is valid.
bool HasValidSuggestText() const;
+ // Returns text describing the URL's security level, for the icon view.
+ base::string16 GetSecurityText() const;
bool ShouldShowKeywordBubble() const;
bool ShouldShowEVBubble() const;
+ // Returns true if the security chip should be displayed (if it has a
+ // verified security level.)
+ bool ShouldShowSecurityChip() const;
+
// Used to "reverse" the URL showing/hiding animations, since we use separate
// animations whose curves are not true inverses of each other. Based on the
// current position of the omnibox, calculates what value the desired
@@ -474,6 +480,9 @@ class LocationBarView : public LocationBar,
// during the last RefreshPageAction.
bool web_contents_null_at_last_refresh_;
+ // Used to avoid animating if security level didn't change.
+ security_state::SecurityStateModel::SecurityLevel previous_security_level_;
+
DISALLOW_COPY_AND_ASSIGN(LocationBarView);
};

Powered by Google App Engine
This is Rietveld 408576698