| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 5 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 CreateActions(); | 786 CreateActions(); |
| 787 | 787 |
| 788 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/463337 is | 788 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/463337 is |
| 789 // fixed. | 789 // fixed. |
| 790 tracked_objects::ScopedTracker tracking_profile( | 790 tracked_objects::ScopedTracker tracking_profile( |
| 791 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 791 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 792 "ToolbarActionsBar::OnToolbarModelInitialized")); | 792 "ToolbarActionsBar::OnToolbarModelInitialized")); |
| 793 ResizeDelegate(gfx::Tween::EASE_OUT, false); | 793 ResizeDelegate(gfx::Tween::EASE_OUT, false); |
| 794 } | 794 } |
| 795 | 795 |
| 796 void ToolbarActionsBar::TabInsertedAt(content::WebContents* contents, | 796 void ToolbarActionsBar::TabInsertedAt(TabStripModel* tab_strip_model, |
| 797 content::WebContents* contents, |
| 797 int index, | 798 int index, |
| 798 bool foreground) { | 799 bool foreground) { |
| 799 if (foreground) | 800 if (foreground) |
| 800 extensions::MaybeShowExtensionControlledNewTabPage(browser_, contents); | 801 extensions::MaybeShowExtensionControlledNewTabPage(browser_, contents); |
| 801 } | 802 } |
| 802 | 803 |
| 803 void ToolbarActionsBar::ReorderActions() { | 804 void ToolbarActionsBar::ReorderActions() { |
| 804 if (toolbar_actions_.empty()) | 805 if (toolbar_actions_.empty()) |
| 805 return; | 806 return; |
| 806 | 807 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 824 for (ToolbarActionViewController* action : toolbar_actions_) { | 825 for (ToolbarActionViewController* action : toolbar_actions_) { |
| 825 if (action->GetId() == action_id) | 826 if (action->GetId() == action_id) |
| 826 return action; | 827 return action; |
| 827 } | 828 } |
| 828 return nullptr; | 829 return nullptr; |
| 829 } | 830 } |
| 830 | 831 |
| 831 content::WebContents* ToolbarActionsBar::GetCurrentWebContents() { | 832 content::WebContents* ToolbarActionsBar::GetCurrentWebContents() { |
| 832 return browser_->tab_strip_model()->GetActiveWebContents(); | 833 return browser_->tab_strip_model()->GetActiveWebContents(); |
| 833 } | 834 } |
| OLD | NEW |