| 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/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
| 10 #include "ash/common/shelf/shelf_model.h" | 10 #include "ash/common/shelf/shelf_model.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController( | 62 BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController( |
| 63 ChromeLauncherController* launcher_controller, | 63 ChromeLauncherController* launcher_controller, |
| 64 ash::ShelfModel* shelf_model) | 64 ash::ShelfModel* shelf_model) |
| 65 : LauncherItemController(TYPE_SHORTCUT, | 65 : LauncherItemController(TYPE_SHORTCUT, |
| 66 extension_misc::kChromeAppId, | 66 extension_misc::kChromeAppId, |
| 67 "", |
| 67 launcher_controller), | 68 launcher_controller), |
| 68 shelf_model_(shelf_model) {} | 69 shelf_model_(shelf_model) {} |
| 69 | 70 |
| 70 BrowserShortcutLauncherItemController:: | 71 BrowserShortcutLauncherItemController:: |
| 71 ~BrowserShortcutLauncherItemController() { | 72 ~BrowserShortcutLauncherItemController() { |
| 72 } | 73 } |
| 73 | 74 |
| 74 void BrowserShortcutLauncherItemController::UpdateBrowserItemState() { | 75 void BrowserShortcutLauncherItemController::UpdateBrowserItemState() { |
| 75 // Determine the new browser's active state and change if necessary. | 76 // Determine the new browser's active state and change if necessary. |
| 76 int browser_index = | 77 int browser_index = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 !browser->window()->IsMinimized()) { | 359 !browser->window()->IsMinimized()) { |
| 359 continue; | 360 continue; |
| 360 } | 361 } |
| 361 if (!IsBrowserRepresentedInBrowserList(browser) && | 362 if (!IsBrowserRepresentedInBrowserList(browser) && |
| 362 !browser->is_type_tabbed()) | 363 !browser->is_type_tabbed()) |
| 363 continue; | 364 continue; |
| 364 active_browsers.push_back(browser); | 365 active_browsers.push_back(browser); |
| 365 } | 366 } |
| 366 return active_browsers; | 367 return active_browsers; |
| 367 } | 368 } |
| OLD | NEW |