| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_shortcut_launcher_item_controll
er.h" | 5 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/shelf/shelf_delegate.h" | 10 #include "ash/common/shelf/shelf_delegate.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace | 61 } // namespace |
| 62 | 62 |
| 63 BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController( | 63 BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController( |
| 64 ChromeLauncherController* launcher_controller, | 64 ChromeLauncherController* launcher_controller, |
| 65 ash::ShelfModel* shelf_model) | 65 ash::ShelfModel* shelf_model) |
| 66 : LauncherItemController(TYPE_SHORTCUT, | 66 : LauncherItemController(TYPE_SHORTCUT, |
| 67 extension_misc::kChromeAppId, | 67 extension_misc::kChromeAppId, |
| 68 "", | 68 "", |
| 69 "", |
| 69 launcher_controller), | 70 launcher_controller), |
| 70 shelf_model_(shelf_model) {} | 71 shelf_model_(shelf_model) {} |
| 71 | 72 |
| 72 BrowserShortcutLauncherItemController:: | 73 BrowserShortcutLauncherItemController:: |
| 73 ~BrowserShortcutLauncherItemController() { | 74 ~BrowserShortcutLauncherItemController() { |
| 74 } | 75 } |
| 75 | 76 |
| 76 void BrowserShortcutLauncherItemController::UpdateBrowserItemState() { | 77 void BrowserShortcutLauncherItemController::UpdateBrowserItemState() { |
| 77 // Determine the new browser's active state and change if necessary. | 78 // Determine the new browser's active state and change if necessary. |
| 78 int browser_index = | 79 int browser_index = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 !browser->window()->IsMinimized()) { | 361 !browser->window()->IsMinimized()) { |
| 361 continue; | 362 continue; |
| 362 } | 363 } |
| 363 if (!IsBrowserRepresentedInBrowserList(browser) && | 364 if (!IsBrowserRepresentedInBrowserList(browser) && |
| 364 !browser->is_type_tabbed()) | 365 !browser->is_type_tabbed()) |
| 365 continue; | 366 continue; |
| 366 active_browsers.push_back(browser); | 367 active_browsers.push_back(browser); |
| 367 } | 368 } |
| 368 return active_browsers; | 369 return active_browsers; |
| 369 } | 370 } |
| OLD | NEW |