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

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

Issue 1935663002: New origin security indicator icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten the Views GetSecureTextColor further, thanks to pkasting. Created 4 years, 7 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.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index c8aedec6ccff2c94107ab6326820efd5292eb0b6..d0ad0935e9f0d733cd0db008ace40fd31682647a 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -57,6 +57,7 @@
#include "components/prefs/pref_service.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
+#include "components/security_state/security_state_model.h"
#include "components/translate/core/browser/language_state.h"
#include "components/ui/zoom/zoom_controller.h"
#include "components/ui/zoom/zoom_event_manager.h"
@@ -570,11 +571,17 @@ void LocationBarViewMac::UpdateLocationIcon() {
vector_icon_color = gfx::kGoogleGreen700;
icon_size = kMaterialSmallIconSize;
} else {
- vector_icon_id = omnibox_view_->GetVectorIcon(in_dark_mode);
+ vector_icon_id = omnibox_view_->GetVectorIcon();
if (in_dark_mode) {
vector_icon_color = SK_ColorWHITE;
} else {
- vector_icon_color = OmniboxViewMac::BaseTextColorSkia(in_dark_mode);
+ security_state::SecurityStateModel::SecurityLevel security_level =
+ GetToolbarModel()->GetSecurityLevel(false);
+ vector_icon_color =
+ (security_level == security_state::SecurityStateModel::NONE)
+ ? OmniboxViewMac::BaseTextColorSkia(in_dark_mode)
+ : skia::NSDeviceColorToSkColor(OmniboxViewMac::GetSecureTextColor(
groby-ooo-7-16 2016/05/23 18:54:46 Question: If we pass in the security level anyways
palmer 2016/05/23 21:11:48 You mean have GetSecureTextColor call GetToolbarMo
groby-ooo-7-16 2016/05/23 23:34:01 No, I meant handling the ::NONE case in GetSecureT
+ security_level, in_dark_mode));
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('j') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698