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

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

Issue 2555063003: Render extension URLs with chips (Closed)
Patch Set: pkasting comments and rebase Created 4 years 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 44248e059e0086a4d61421f5942cc447036a9605..5335967eea462abe9817a647ec088b0b164a2c4f 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -77,6 +77,7 @@ class LocationBarView : public LocationBar,
public:
// Should return the current web contents.
virtual content::WebContents* GetWebContents() = 0;
+ virtual const content::WebContents* GetWebContents() const = 0;
virtual ToolbarModel* GetToolbarModel() = 0;
virtual const ToolbarModel* GetToolbarModel() const = 0;
@@ -313,16 +314,18 @@ class LocationBarView : public LocationBar,
// Returns text describing the URL's security level, to be placed in the
// security chip.
Peter Kasting 2016/12/20 01:59:31 This is somewhat misleading, since the extension n
meacer 2016/12/21 01:38:56 Sorry I missed your naming suggestion in the previ
- base::string16 GetSecurityText() const;
+ base::string16 GetSecurityText(const GURL& url,
+ content::WebContents* contents) const;
Peter Kasting 2016/12/20 01:59:31 Don't add these args; both callers pass the same v
meacer 2016/12/21 01:38:56 Done.
bool ShouldShowKeywordBubble() const;
- // Returns true when the current page is explicitly secure or insecure.
- // In these cases, we should show the state of the security chip.
- bool ShouldShowSecurityChip() const;
+ // Returns true if any of the following is true:
+ // - the current page is explicitly secure or insecure
+ // - the current page URL is a chrome-extension:// URL.
+ bool ShouldShowSecurityText() const;
- // Returns true if the chip should be animated
- bool ShouldAnimateSecurityChip() const;
+ // Returns true if the security text should be animated
Peter Kasting 2016/12/20 01:59:31 Nit: Trailing period
meacer 2016/12/21 01:38:56 Done.
+ bool ShouldAnimateSecurityText() 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

Powered by Google App Engine
This is Rietveld 408576698