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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 2119033002: [Material][Mac] Implement Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the verbose for "NOT SECURE" Created 4 years, 6 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/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 651a099d67569a1ff6d7c27a07f9fa6df75edcbc..859f41b932cece5431612468165cc20cbfe11273 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -20,12 +20,13 @@
#include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/prefs/pref_member.h"
+#include "components/security_state/security_state_model.h"
#include "components/zoom/zoom_event_manager_observer.h"
@class AutocompleteTextField;
class CommandUpdater;
class ContentSettingDecoration;
-class EVBubbleDecoration;
+class SecureVerboseBubbleDecoration;
class KeywordHintDecoration;
class LocationBarDecoration;
class LocationIconDecoration;
@@ -39,6 +40,10 @@ class TranslateDecoration;
class ZoomDecoration;
class ZoomDecorationTest;
+namespace net {
+class X509Certificate;
+}
+
// A C++ bridge class that represents the location bar UI element to
// the portable code. Wires up an OmniboxViewMac instance to
// the location bar text field, which handles most of the work.
@@ -184,8 +189,17 @@ class LocationBarViewMac : public LocationBar,
content::WebContents* GetWebContents() override;
bool ShouldShowEVBubble() const;
+
+ // Returns true if the secure verbose decoration should be displayed. This
+ // includes the EV cert decoration. For Phase 1, the verbose shouldn't be
+ // displayed for "Not Secure".
+ bool ShouldShowSecureVerbose() const;
+
NSImage* GetKeywordImage(const base::string16& keyword);
+ // Returns the color for the vector icon in the location bar.
+ SkColor GetLocationBarIconColor() const;
+
AutocompleteTextField* GetAutocompleteTextField() { return field_; }
// Returns true if the location bar is dark.
@@ -248,9 +262,10 @@ class LocationBarViewMac : public LocationBar,
// A decoration that shows the keyword-search bubble on the left.
std::unique_ptr<SelectedKeywordDecoration> selected_keyword_decoration_;
- // A decoration that shows a lock icon and ev-cert label in a bubble
- // on the left.
- std::unique_ptr<EVBubbleDecoration> ev_bubble_decoration_;
+ // A decoration that shows a security icon and the secure verbose or ev-cert
+ // label in a bubble on the left.
+ std::unique_ptr<SecureVerboseBubbleDecoration>
+ secure_verbose_bubble_decoration_;
// Save credit card icon on the right side of the omnibox.
std::unique_ptr<SaveCreditCardDecoration> save_credit_card_decoration_;
@@ -285,6 +300,13 @@ class LocationBarViewMac : public LocationBar,
// Indicates whether or not the location bar is currently visible.
bool location_bar_visible_;
+ // The security level of the location bar icon.
+ security_state::SecurityStateModel::SecurityLevel security_level_;
+
+ // The EV certificate for the "Extended Validation SSL" bubble. It's empty
+ // if we are not displaying a certificate.
+ scoped_refptr<net::X509Certificate> certificate_;
+
// Used to schedule a task for the first run info bubble.
base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698