| 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/shelf/shelf_util.h" | 7 #include "ash/shelf/shelf_util.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 BrowserTabStripTracker::InitWith::ALL_BROWERS); | 115 BrowserTabStripTracker::InitWith::ALL_BROWERS); |
| 116 } | 116 } |
| 117 | 117 |
| 118 BrowserStatusMonitor::~BrowserStatusMonitor() { | 118 BrowserStatusMonitor::~BrowserStatusMonitor() { |
| 119 ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); | 119 ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); |
| 120 chrome::SettingsWindowManager::GetInstance()->RemoveObserver( | 120 chrome::SettingsWindowManager::GetInstance()->RemoveObserver( |
| 121 settings_window_observer_.get()); | 121 settings_window_observer_.get()); |
| 122 | 122 |
| 123 browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved(); | 123 browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved(); |
| 124 | 124 |
| 125 STLDeleteContainerPairSecondPointers(webcontents_to_observer_map_.begin(), | 125 base::STLDeleteContainerPairSecondPointers( |
| 126 webcontents_to_observer_map_.end()); | 126 webcontents_to_observer_map_.begin(), webcontents_to_observer_map_.end()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void BrowserStatusMonitor::UpdateAppItemState( | 129 void BrowserStatusMonitor::UpdateAppItemState( |
| 130 content::WebContents* contents, | 130 content::WebContents* contents, |
| 131 ChromeLauncherController::AppState app_state) { | 131 ChromeLauncherController::AppState app_state) { |
| 132 DCHECK(contents); | 132 DCHECK(contents); |
| 133 // It is possible to come here from Browser::SwapTabContent where the contents | 133 // It is possible to come here from Browser::SwapTabContent where the contents |
| 134 // cannot be associated with a browser. A removal however should be properly | 134 // cannot be associated with a browser. A removal however should be properly |
| 135 // processed. | 135 // processed. |
| 136 Browser* browser = chrome::FindBrowserWithWebContents(contents); | 136 Browser* browser = chrome::FindBrowserWithWebContents(contents); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 content::WebContents* contents) { | 321 content::WebContents* contents) { |
| 322 return launcher_controller_->GetShelfIDForWebContents(contents); | 322 return launcher_controller_->GetShelfIDForWebContents(contents); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void BrowserStatusMonitor::SetShelfIDForBrowserWindowContents( | 325 void BrowserStatusMonitor::SetShelfIDForBrowserWindowContents( |
| 326 Browser* browser, | 326 Browser* browser, |
| 327 content::WebContents* web_contents) { | 327 content::WebContents* web_contents) { |
| 328 launcher_controller_->GetBrowserShortcutLauncherItemController()-> | 328 launcher_controller_->GetBrowserShortcutLauncherItemController()-> |
| 329 SetShelfIDForBrowserWindowContents(browser, web_contents); | 329 SetShelfIDForBrowserWindowContents(browser, web_contents); |
| 330 } | 330 } |
| OLD | NEW |