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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 void BrowserLauncherItemController::TabInsertedAt( | 211 void BrowserLauncherItemController::TabInsertedAt( |
212 content::WebContents* contents, | 212 content::WebContents* contents, |
213 int index, | 213 int index, |
214 bool foreground) { | 214 bool foreground) { |
215 UpdateAppState(contents); | 215 UpdateAppState(contents); |
216 } | 216 } |
217 | 217 |
218 void BrowserLauncherItemController::TabDetachedAt( | 218 void BrowserLauncherItemController::TabDetachedAt( |
219 content::WebContents* contents, | 219 content::WebContents* contents, |
220 int index) { | 220 int index, |
| 221 bool closing_all) { |
221 launcher_controller()->UpdateAppState( | 222 launcher_controller()->UpdateAppState( |
222 contents, ChromeLauncherController::APP_STATE_REMOVED); | 223 contents, ChromeLauncherController::APP_STATE_REMOVED); |
223 } | 224 } |
224 | 225 |
225 void BrowserLauncherItemController::TabChangedAt( | 226 void BrowserLauncherItemController::TabChangedAt( |
226 content::WebContents* contents, | 227 content::WebContents* contents, |
227 int index, | 228 int index, |
228 TabStripModelObserver::TabChangeType change_type) { | 229 TabStripModelObserver::TabChangeType change_type) { |
229 UpdateAppState(contents); | 230 UpdateAppState(contents); |
230 if (index != tab_model_->active_index() || | 231 if (index != tab_model_->active_index() || |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 app_state = ChromeLauncherController::APP_STATE_ACTIVE; | 317 app_state = ChromeLauncherController::APP_STATE_ACTIVE; |
317 } else { | 318 } else { |
318 app_state = ChromeLauncherController::APP_STATE_INACTIVE; | 319 app_state = ChromeLauncherController::APP_STATE_INACTIVE; |
319 } | 320 } |
320 launcher_controller()->UpdateAppState(tab, app_state); | 321 launcher_controller()->UpdateAppState(tab, app_state); |
321 } | 322 } |
322 | 323 |
323 ash::LauncherModel* BrowserLauncherItemController::launcher_model() { | 324 ash::LauncherModel* BrowserLauncherItemController::launcher_model() { |
324 return launcher_controller()->model(); | 325 return launcher_controller()->model(); |
325 } | 326 } |
OLD | NEW |