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

Side by Side Diff: chrome/browser/ui/ash/launcher/browser_status_monitor.cc

Issue 2741053005: [Chrome OS] Clean up BrowserTabStripTracker Init parameter. (Closed)
Patch Set: . Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/launcher/browser_status_monitor.h" 5 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h"
6 6
7 #include "ash/common/shelf/shelf_item_types.h" 7 #include "ash/common/shelf/shelf_item_types.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 79 };
80 80
81 BrowserStatusMonitor::BrowserStatusMonitor( 81 BrowserStatusMonitor::BrowserStatusMonitor(
82 ChromeLauncherController* launcher_controller) 82 ChromeLauncherController* launcher_controller)
83 : launcher_controller_(launcher_controller), 83 : launcher_controller_(launcher_controller),
84 browser_tab_strip_tracker_(this, this, this) { 84 browser_tab_strip_tracker_(this, this, this) {
85 DCHECK(launcher_controller_); 85 DCHECK(launcher_controller_);
86 86
87 ash::Shell::GetInstance()->activation_client()->AddObserver(this); 87 ash::Shell::GetInstance()->activation_client()->AddObserver(this);
88 88
89 browser_tab_strip_tracker_.Init( 89 browser_tab_strip_tracker_.Init();
90 BrowserTabStripTracker::InitWith::ALL_BROWERS);
91 } 90 }
92 91
93 BrowserStatusMonitor::~BrowserStatusMonitor() { 92 BrowserStatusMonitor::~BrowserStatusMonitor() {
94 ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); 93 ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
95 browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved(); 94 browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved();
96 } 95 }
97 96
98 void BrowserStatusMonitor::UpdateAppItemState( 97 void BrowserStatusMonitor::UpdateAppItemState(
99 content::WebContents* contents, 98 content::WebContents* contents,
100 ChromeLauncherController::AppState app_state) { 99 ChromeLauncherController::AppState app_state) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 content::WebContents* contents) { 289 content::WebContents* contents) {
291 return launcher_controller_->GetShelfIDForWebContents(contents); 290 return launcher_controller_->GetShelfIDForWebContents(contents);
292 } 291 }
293 292
294 void BrowserStatusMonitor::SetShelfIDForBrowserWindowContents( 293 void BrowserStatusMonitor::SetShelfIDForBrowserWindowContents(
295 Browser* browser, 294 Browser* browser,
296 content::WebContents* web_contents) { 295 content::WebContents* web_contents) {
297 launcher_controller_->GetBrowserShortcutLauncherItemController()-> 296 launcher_controller_->GetBrowserShortcutLauncherItemController()->
298 SetShelfIDForBrowserWindowContents(browser, web_contents); 297 SetShelfIDForBrowserWindowContents(browser, web_contents);
299 } 298 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/tab_usage_recorder.cc ('k') | chrome/browser/ui/browser_tab_strip_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698