| 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 return (GetToolbarModel()->GetSecurityLevel(false) == | 681 return (GetToolbarModel()->GetSecurityLevel(false) == |
| 682 security_state::SecurityStateModel::EV_SECURE) && | 682 security_state::SecurityStateModel::EV_SECURE) && |
| 683 should_show_secure_verbose_; | 683 should_show_secure_verbose_; |
| 684 } | 684 } |
| 685 | 685 |
| 686 bool LocationBarViewMac::ShouldShowSecurityState() const { | 686 bool LocationBarViewMac::ShouldShowSecurityState() const { |
| 687 security_state::SecurityStateModel::SecurityLevel security = | 687 security_state::SecurityStateModel::SecurityLevel security = |
| 688 GetToolbarModel()->GetSecurityLevel(false); | 688 GetToolbarModel()->GetSecurityLevel(false); |
| 689 bool has_verbose_for_security = | 689 bool has_verbose_for_security = |
| 690 security == security_state::SecurityStateModel::DANGEROUS || | 690 security == security_state::SecurityStateModel::DANGEROUS || |
| 691 security == security_state::SecurityStateModel::HTTP_SHOW_WARNING || |
| 691 (IsSecureConnection(security) && should_show_secure_verbose_); | 692 (IsSecureConnection(security) && should_show_secure_verbose_); |
| 692 | 693 |
| 693 return has_verbose_for_security && !omnibox_view_->IsEditingOrEmpty() && | 694 return has_verbose_for_security && !omnibox_view_->IsEditingOrEmpty() && |
| 694 !omnibox_view_->model()->is_keyword_hint(); | 695 !omnibox_view_->model()->is_keyword_hint(); |
| 695 } | 696 } |
| 696 | 697 |
| 697 bool LocationBarViewMac::IsLocationBarDark() const { | 698 bool LocationBarViewMac::IsLocationBarDark() const { |
| 698 return [[field_ window] inIncognitoModeWithSystemTheme]; | 699 return [[field_ window] inIncognitoModeWithSystemTheme]; |
| 699 } | 700 } |
| 700 | 701 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 OnDecorationsChanged(); | 943 OnDecorationsChanged(); |
| 943 } | 944 } |
| 944 | 945 |
| 945 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 946 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 946 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 947 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 947 std::vector<NSView*> views; | 948 std::vector<NSView*> views; |
| 948 for (auto* decoration : decorations) | 949 for (auto* decoration : decorations) |
| 949 views.push_back(decoration->GetAccessibilityView()); | 950 views.push_back(decoration->GetAccessibilityView()); |
| 950 return views; | 951 return views; |
| 951 } | 952 } |
| OLD | NEW |