| OLD | NEW |
| 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/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 bool in_dark_mode = IsLocationBarDark(); | 713 bool in_dark_mode = IsLocationBarDark(); |
| 714 if (in_dark_mode) | 714 if (in_dark_mode) |
| 715 return kMaterialDarkVectorIconColor; | 715 return kMaterialDarkVectorIconColor; |
| 716 | 716 |
| 717 if (ShouldShowEVBubble()) | 717 if (ShouldShowEVBubble()) |
| 718 return gfx::kGoogleGreen700; | 718 return gfx::kGoogleGreen700; |
| 719 | 719 |
| 720 security_state::SecurityStateModel::SecurityLevel security_level = | 720 security_state::SecurityStateModel::SecurityLevel security_level = |
| 721 GetToolbarModel()->GetSecurityLevel(false); | 721 GetToolbarModel()->GetSecurityLevel(false); |
| 722 | 722 |
| 723 if (security_level == security_state::SecurityStateModel::NONE) | 723 if (security_level == security_state::SecurityStateModel::NONE || |
| 724 security_level == security_state::SecurityStateModel::HTTP_SHOW_WARNING) { |
| 724 return gfx::kChromeIconGrey; | 725 return gfx::kChromeIconGrey; |
| 726 } |
| 725 | 727 |
| 726 NSColor* srgb_color = | 728 NSColor* srgb_color = |
| 727 OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode); | 729 OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode); |
| 728 NSColor* device_color = | 730 NSColor* device_color = |
| 729 [srgb_color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; | 731 [srgb_color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; |
| 730 return skia::NSDeviceColorToSkColor(device_color); | 732 return skia::NSDeviceColorToSkColor(device_color); |
| 731 } | 733 } |
| 732 | 734 |
| 733 void LocationBarViewMac::PostNotification(NSString* notification) { | 735 void LocationBarViewMac::PostNotification(NSString* notification) { |
| 734 [[NSNotificationCenter defaultCenter] postNotificationName:notification | 736 [[NSNotificationCenter defaultCenter] postNotificationName:notification |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 OnDecorationsChanged(); | 931 OnDecorationsChanged(); |
| 930 } | 932 } |
| 931 | 933 |
| 932 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 934 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 933 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 935 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 934 std::vector<NSView*> views; | 936 std::vector<NSView*> views; |
| 935 for (auto* decoration : decorations) | 937 for (auto* decoration : decorations) |
| 936 views.push_back(decoration->GetAccessibilityView()); | 938 views.push_back(decoration->GetAccessibilityView()); |
| 937 return views; | 939 return views; |
| 938 } | 940 } |
| OLD | NEW |