Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.cc

Issue 2335203003: Add metrics to keep track of the tab activate/deactivate cycle (Closed)
Patch Set: Addressed comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698