| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return; | 617 return; |
| 618 } | 618 } |
| 619 | 619 |
| 620 TabContents* tab_contents = GetTabContents(); | 620 TabContents* tab_contents = GetTabContents(); |
| 621 if (!tab_contents) { | 621 if (!tab_contents) { |
| 622 DeletePageActionDecorations(); // Necessary? | 622 DeletePageActionDecorations(); // Necessary? |
| 623 return; | 623 return; |
| 624 } | 624 } |
| 625 | 625 |
| 626 std::vector<ExtensionAction*> new_page_actions = | 626 std::vector<ExtensionAction*> new_page_actions = |
| 627 tab_contents->extension_tab_helper()->location_bar_controller()-> | 627 extensions::TabHelper::FromWebContents(tab_contents->web_contents())-> |
| 628 GetCurrentActions(); | 628 location_bar_controller()->GetCurrentActions(); |
| 629 | 629 |
| 630 if (new_page_actions != page_actions_) { | 630 if (new_page_actions != page_actions_) { |
| 631 page_actions_.swap(new_page_actions); | 631 page_actions_.swap(new_page_actions); |
| 632 DeletePageActionDecorations(); | 632 DeletePageActionDecorations(); |
| 633 for (size_t i = 0; i < page_actions_.size(); ++i) { | 633 for (size_t i = 0; i < page_actions_.size(); ++i) { |
| 634 page_action_decorations_.push_back( | 634 page_action_decorations_.push_back( |
| 635 new PageActionDecoration(this, browser_, page_actions_[i])); | 635 new PageActionDecoration(this, browser_, page_actions_[i])); |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 visible = false; | 767 visible = false; |
| 768 star_decoration_->SetVisible(visible); | 768 star_decoration_->SetVisible(visible); |
| 769 } | 769 } |
| 770 | 770 |
| 771 void LocationBarViewMac::UpdatePlusDecorationVisibility() { | 771 void LocationBarViewMac::UpdatePlusDecorationVisibility() { |
| 772 if (extensions::switch_utils::IsActionBoxEnabled()) { | 772 if (extensions::switch_utils::IsActionBoxEnabled()) { |
| 773 // If the action box is enabled, hide it when input is in progress. | 773 // If the action box is enabled, hide it when input is in progress. |
| 774 plus_decoration_->SetVisible(!toolbar_model_->input_in_progress()); | 774 plus_decoration_->SetVisible(!toolbar_model_->input_in_progress()); |
| 775 } | 775 } |
| 776 } | 776 } |
| OLD | NEW |