| 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 BrowserShortcutLauncherItemController* | 132 BrowserShortcutLauncherItemController* |
| 133 GetBrowserShortcutLauncherItemController() override; | 133 GetBrowserShortcutLauncherItemController() override; |
| 134 LauncherItemController* GetLauncherItemController( | 134 LauncherItemController* GetLauncherItemController( |
| 135 const ash::ShelfID id) override; | 135 const ash::ShelfID id) override; |
| 136 bool ShelfBoundsChangesProbablyWithUser( | 136 bool ShelfBoundsChangesProbablyWithUser( |
| 137 ash::Shelf* shelf, | 137 ash::Shelf* shelf, |
| 138 const AccountId& account_id) const override; | 138 const AccountId& account_id) const override; |
| 139 void OnUserProfileReadyToSwitch(Profile* profile) override; | 139 void OnUserProfileReadyToSwitch(Profile* profile) override; |
| 140 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; | 140 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; |
| 141 | 141 |
| 142 void SetProfileForTest(Profile* profile); |
| 143 |
| 142 // Access to the BrowserStatusMonitor for tests. | 144 // Access to the BrowserStatusMonitor for tests. |
| 143 BrowserStatusMonitor* browser_status_monitor_for_test() { | 145 BrowserStatusMonitor* browser_status_monitor_for_test() { |
| 144 return browser_status_monitor_.get(); | 146 return browser_status_monitor_.get(); |
| 145 } | 147 } |
| 146 | 148 |
| 147 // Access to the AppWindowLauncherController for tests. | 149 // Access to the AppWindowLauncherController list for tests. |
| 148 AppWindowLauncherController* app_window_controller_for_test() { | 150 const std::vector<std::unique_ptr<AppWindowLauncherController>>& |
| 149 return app_window_controllers_[0].get(); | 151 app_window_controllers_for_test() { |
| 152 return app_window_controllers_; |
| 150 } | 153 } |
| 151 | 154 |
| 152 // ash::ShelfDelegate: | 155 // ash::ShelfDelegate: |
| 153 void OnShelfCreated(ash::WmShelf* shelf) override; | 156 void OnShelfCreated(ash::WmShelf* shelf) override; |
| 154 void OnShelfDestroyed(ash::WmShelf* shelf) override; | 157 void OnShelfDestroyed(ash::WmShelf* shelf) override; |
| 155 void OnShelfAlignmentChanged(ash::WmShelf* shelf) override; | 158 void OnShelfAlignmentChanged(ash::WmShelf* shelf) override; |
| 156 void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override; | 159 void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override; |
| 157 void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override; | 160 void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override; |
| 158 void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override; | 161 void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override; |
| 159 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; | 162 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // deleted. | 277 // deleted. |
| 275 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, | 278 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, |
| 276 const Profile* profile); | 279 const Profile* profile); |
| 277 | 280 |
| 278 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. | 281 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. |
| 279 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. | 282 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. |
| 280 void SetShelfItemDelegate(ash::ShelfID id, | 283 void SetShelfItemDelegate(ash::ShelfID id, |
| 281 ash::ShelfItemDelegate* item_delegate); | 284 ash::ShelfItemDelegate* item_delegate); |
| 282 | 285 |
| 283 // Attach to a specific profile. | 286 // Attach to a specific profile. |
| 284 void AttachProfile(Profile* proifile); | 287 void AttachProfile(Profile* profile); |
| 285 | 288 |
| 286 // Forget the current profile to allow attaching to a new one. | 289 // Forget the current profile to allow attaching to a new one. |
| 287 void ReleaseProfile(); | 290 void ReleaseProfile(); |
| 288 | 291 |
| 289 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); | 292 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); |
| 290 | 293 |
| 291 // ash::ShelfModelObserver: | 294 // ash::ShelfModelObserver: |
| 292 void ShelfItemAdded(int index) override; | 295 void ShelfItemAdded(int index) override; |
| 293 void ShelfItemRemoved(int index, ash::ShelfID id) override; | 296 void ShelfItemRemoved(int index, ash::ShelfID id) override; |
| 294 void ShelfItemMoved(int start_index, int target_index) override; | 297 void ShelfItemMoved(int start_index, int target_index) override; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 typedef std::vector<std::string> RunningAppListIds; | 364 typedef std::vector<std::string> RunningAppListIds; |
| 362 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 365 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 363 RunningAppListIdMap last_used_running_application_order_; | 366 RunningAppListIdMap last_used_running_application_order_; |
| 364 | 367 |
| 365 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; | 368 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; |
| 366 | 369 |
| 367 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 370 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
| 368 }; | 371 }; |
| 369 | 372 |
| 370 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 373 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| OLD | NEW |