| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_launcher_item_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/launcher/launcher_model.h" | 8 #include "ash/launcher/launcher_model.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 !(change_type != TabStripModelObserver::LOADING_ONLY && | 202 !(change_type != TabStripModelObserver::LOADING_ONLY && |
| 203 change_type != TabStripModelObserver::TITLE_NOT_LOADING)) { | 203 change_type != TabStripModelObserver::TITLE_NOT_LOADING)) { |
| 204 return; | 204 return; |
| 205 } | 205 } |
| 206 | 206 |
| 207 UpdateLauncher(contents); | 207 UpdateLauncher(contents); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void BrowserLauncherItemController::TabReplacedAt( | 210 void BrowserLauncherItemController::TabReplacedAt( |
| 211 TabStripModel* tab_strip_model, | 211 TabStripModel* tab_strip_model, |
| 212 TabContents* old_contents, | 212 content::WebContents* old_contents, |
| 213 TabContents* new_contents, | 213 content::WebContents* new_contents, |
| 214 int index) { | 214 int index) { |
| 215 launcher_controller()->UpdateAppState( | 215 launcher_controller()->UpdateAppState( |
| 216 old_contents->web_contents(), | 216 old_contents, |
| 217 ChromeLauncherController::APP_STATE_REMOVED); | 217 ChromeLauncherController::APP_STATE_REMOVED); |
| 218 UpdateAppState(new_contents->web_contents()); | 218 UpdateAppState(new_contents); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void BrowserLauncherItemController::FaviconUpdated() { | 221 void BrowserLauncherItemController::FaviconUpdated() { |
| 222 UpdateLauncher(tab_model_->GetActiveWebContents()); | 222 UpdateLauncher(tab_model_->GetActiveWebContents()); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void BrowserLauncherItemController::OnWindowPropertyChanged( | 225 void BrowserLauncherItemController::OnWindowPropertyChanged( |
| 226 aura::Window* window, | 226 aura::Window* window, |
| 227 const void* key, | 227 const void* key, |
| 228 intptr_t old) { | 228 intptr_t old) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 app_state = ChromeLauncherController::APP_STATE_ACTIVE; | 302 app_state = ChromeLauncherController::APP_STATE_ACTIVE; |
| 303 } else { | 303 } else { |
| 304 app_state = ChromeLauncherController::APP_STATE_INACTIVE; | 304 app_state = ChromeLauncherController::APP_STATE_INACTIVE; |
| 305 } | 305 } |
| 306 launcher_controller()->UpdateAppState(tab, app_state); | 306 launcher_controller()->UpdateAppState(tab, app_state); |
| 307 } | 307 } |
| 308 | 308 |
| 309 ash::LauncherModel* BrowserLauncherItemController::launcher_model() { | 309 ash::LauncherModel* BrowserLauncherItemController::launcher_model() { |
| 310 return launcher_controller()->model(); | 310 return launcher_controller()->model(); |
| 311 } | 311 } |
| OLD | NEW |