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 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 enabled); | 214 enabled); |
215 save_credit_card_decoration_->SetIcon(IsLocationBarDark()); | 215 save_credit_card_decoration_->SetIcon(IsLocationBarDark()); |
216 save_credit_card_decoration_->SetVisible(enabled); | 216 save_credit_card_decoration_->SetVisible(enabled); |
217 OnDecorationsChanged(); | 217 OnDecorationsChanged(); |
218 } | 218 } |
219 | 219 |
220 void LocationBarViewMac::UpdateBookmarkStarVisibility() { | 220 void LocationBarViewMac::UpdateBookmarkStarVisibility() { |
221 star_decoration_->SetVisible(IsStarEnabled()); | 221 star_decoration_->SetVisible(IsStarEnabled()); |
222 } | 222 } |
223 | 223 |
| 224 void LocationBarViewMac::UpdateZoomViewVisibility() { |
| 225 UpdateZoomDecoration(/*default_zoom_changed=*/false); |
| 226 OnChanged(); |
| 227 } |
| 228 |
224 void LocationBarViewMac::UpdateLocationBarVisibility(bool visible, | 229 void LocationBarViewMac::UpdateLocationBarVisibility(bool visible, |
225 bool animate) { | 230 bool animate) { |
226 // Track the target location bar visibility to avoid redundant transitions | 231 // Track the target location bar visibility to avoid redundant transitions |
227 // being initiated when one is already in progress. | 232 // being initiated when one is already in progress. |
228 if (visible != location_bar_visible_) { | 233 if (visible != location_bar_visible_) { |
229 [[[BrowserWindowController browserWindowControllerForView:field_] | 234 [[[BrowserWindowController browserWindowControllerForView:field_] |
230 toolbarController] updateVisibility:visible | 235 toolbarController] updateVisibility:visible |
231 withAnimation:animate]; | 236 withAnimation:animate]; |
232 location_bar_visible_ = visible; | 237 location_bar_visible_ = visible; |
233 } | 238 } |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 OnDecorationsChanged(); | 810 OnDecorationsChanged(); |
806 } | 811 } |
807 | 812 |
808 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 813 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
809 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 814 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
810 std::vector<NSView*> views; | 815 std::vector<NSView*> views; |
811 for (auto* decoration : decorations) | 816 for (auto* decoration : decorations) |
812 views.push_back(decoration->GetAccessibilityView()); | 817 views.push_back(decoration->GetAccessibilityView()); |
813 return views; | 818 return views; |
814 } | 819 } |
OLD | NEW |