| 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 DeletePageActionDecorations(); | 775 DeletePageActionDecorations(); |
| 776 return; | 776 return; |
| 777 } | 777 } |
| 778 | 778 |
| 779 std::vector<ExtensionAction*> new_page_actions = | 779 std::vector<ExtensionAction*> new_page_actions = |
| 780 extensions::TabHelper::FromWebContents(web_contents)-> | 780 extensions::TabHelper::FromWebContents(web_contents)-> |
| 781 location_bar_controller()->GetCurrentActions(); | 781 location_bar_controller()->GetCurrentActions(); |
| 782 | 782 |
| 783 if (PageActionsDiffer(new_page_actions)) { | 783 if (PageActionsDiffer(new_page_actions)) { |
| 784 DeletePageActionDecorations(); | 784 DeletePageActionDecorations(); |
| 785 for (const auto new_page_action : new_page_actions) { | 785 for (auto* new_page_action : new_page_actions) { |
| 786 page_action_decorations_.push_back(base::MakeUnique<PageActionDecoration>( | 786 page_action_decorations_.push_back(base::MakeUnique<PageActionDecoration>( |
| 787 this, browser_, new_page_action)); | 787 this, browser_, new_page_action)); |
| 788 } | 788 } |
| 789 } | 789 } |
| 790 | 790 |
| 791 GURL url = GetToolbarModel()->GetURL(); | 791 GURL url = GetToolbarModel()->GetURL(); |
| 792 for (const auto& decoration : page_action_decorations_) { | 792 for (const auto& decoration : page_action_decorations_) { |
| 793 decoration->UpdateVisibility( | 793 decoration->UpdateVisibility( |
| 794 GetToolbarModel()->input_in_progress() ? NULL : web_contents); | 794 GetToolbarModel()->input_in_progress() ? NULL : web_contents); |
| 795 } | 795 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 OnDecorationsChanged(); | 945 OnDecorationsChanged(); |
| 946 } | 946 } |
| 947 | 947 |
| 948 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { | 948 std::vector<NSView*> LocationBarViewMac::GetDecorationAccessibilityViews() { |
| 949 std::vector<LocationBarDecoration*> decorations = GetDecorations(); | 949 std::vector<LocationBarDecoration*> decorations = GetDecorations(); |
| 950 std::vector<NSView*> views; | 950 std::vector<NSView*> views; |
| 951 for (auto* decoration : decorations) | 951 for (auto* decoration : decorations) |
| 952 views.push_back(decoration->GetAccessibilityView()); | 952 views.push_back(decoration->GetAccessibilityView()); |
| 953 return views; | 953 return views; |
| 954 } | 954 } |
| OLD | NEW |