| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |