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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 2067443003: [Mac][Material] Fixed the lock icon color (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #import "base/mac/mac_util.h" 9 #import "base/mac/mac_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 SkColor vector_icon_color = gfx::kPlaceholderColor; 721 SkColor vector_icon_color = gfx::kPlaceholderColor;
722 gfx::VectorIconId vector_icon_id = gfx::VectorIconId::VECTOR_ICON_NONE; 722 gfx::VectorIconId vector_icon_id = gfx::VectorIconId::VECTOR_ICON_NONE;
723 if (ShouldShowEVBubble()) { 723 if (ShouldShowEVBubble()) {
724 vector_icon_id = gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID; 724 vector_icon_id = gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID;
725 vector_icon_color = in_dark_mode 725 vector_icon_color = in_dark_mode
726 ? LocationBarDecoration::kMaterialDarkModeTextColor 726 ? LocationBarDecoration::kMaterialDarkModeTextColor
727 : gfx::kGoogleGreen700; 727 : gfx::kGoogleGreen700;
728 } else { 728 } else {
729 vector_icon_id = omnibox_view_->GetVectorIcon(); 729 vector_icon_id = omnibox_view_->GetVectorIcon();
730 if (in_dark_mode) { 730 if (in_dark_mode) {
731 vector_icon_color = SK_ColorWHITE; 731 vector_icon_color = LocationBarDecoration::kMaterialDarkModeTextColor;
732 } else { 732 } else {
733 security_state::SecurityStateModel::SecurityLevel security_level = 733 security_state::SecurityStateModel::SecurityLevel security_level =
734 GetToolbarModel()->GetSecurityLevel(false); 734 GetToolbarModel()->GetSecurityLevel(false);
735 if (security_level == security_state::SecurityStateModel::NONE) { 735 if (security_level == security_state::SecurityStateModel::NONE) {
736 vector_icon_color = OmniboxViewMac::BaseTextColorSkia(in_dark_mode); 736 vector_icon_color = OmniboxViewMac::BaseTextColorSkia(in_dark_mode);
737 } else { 737 } else {
738 NSColor* sRGBColor = 738 NSColor* sRGBColor =
739 OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode); 739 OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode);
740 NSColor* deviceColor = 740 NSColor* deviceColor =
741 [sRGBColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; 741 [sRGBColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 969
970 return zoom_decoration_->UpdateIfNecessary( 970 return zoom_decoration_->UpdateIfNecessary(
971 zoom::ZoomController::FromWebContents(web_contents), default_zoom_changed, 971 zoom::ZoomController::FromWebContents(web_contents), default_zoom_changed,
972 IsLocationBarDark()); 972 IsLocationBarDark());
973 } 973 }
974 974
975 void LocationBarViewMac::OnDefaultZoomLevelChanged() { 975 void LocationBarViewMac::OnDefaultZoomLevelChanged() {
976 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) 976 if (UpdateZoomDecoration(/*default_zoom_changed=*/true))
977 OnDecorationsChanged(); 977 OnDecorationsChanged();
978 } 978 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698