| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 ++current; | 325 ++current; |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 bool LocationBarViewMac::GetBookmarkStarVisibility() { | 330 bool LocationBarViewMac::GetBookmarkStarVisibility() { |
| 331 DCHECK(star_decoration_.get()); | 331 DCHECK(star_decoration_.get()); |
| 332 return star_decoration_->IsVisible(); | 332 return star_decoration_->IsVisible(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 int LocationBarViewMac::ContentSettingImageModelCount() { |
| 336 return 0; |
| 337 } |
| 338 |
| 339 ContentSettingImageModel* LocationBarViewMac::GetContentSettingImageModel( |
| 340 size_t index) { |
| 341 return nullptr; |
| 342 } |
| 343 |
| 335 void LocationBarViewMac::SetEditable(bool editable) { | 344 void LocationBarViewMac::SetEditable(bool editable) { |
| 336 [field_ setEditable:editable ? YES : NO]; | 345 [field_ setEditable:editable ? YES : NO]; |
| 337 UpdateBookmarkStarVisibility(); | 346 UpdateBookmarkStarVisibility(); |
| 338 UpdateZoomDecoration(/*default_zoom_changed=*/false); | 347 UpdateZoomDecoration(/*default_zoom_changed=*/false); |
| 339 UpdatePageActions(); | 348 UpdatePageActions(); |
| 340 Layout(); | 349 Layout(); |
| 341 } | 350 } |
| 342 | 351 |
| 343 bool LocationBarViewMac::IsEditable() { | 352 bool LocationBarViewMac::IsEditable() { |
| 344 return [field_ isEditable] ? true : false; | 353 return [field_ isEditable] ? true : false; |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 OnDecorationsChanged(); | 954 OnDecorationsChanged(); |
| 946 } | 955 } |
| 947 | 956 |
| 948 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 957 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 949 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 958 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 950 std::vector<NSView*> views; | 959 std::vector<NSView*> views; |
| 951 for (auto* decoration : decorations) | 960 for (auto* decoration : decorations) |
| 952 views.push_back(decoration->GetAccessibilityView()); | 961 views.push_back(decoration->GetAccessibilityView()); |
| 953 return views; | 962 return views; |
| 954 } | 963 } |
| OLD | NEW |