| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // animation predictions. | 213 // animation predictions. |
| 214 bool ShelfBoundsChangesProbablyWithUser(ash::WmShelf* shelf, | 214 bool ShelfBoundsChangesProbablyWithUser(ash::WmShelf* shelf, |
| 215 const AccountId& account_id) const; | 215 const AccountId& account_id) const; |
| 216 | 216 |
| 217 // Called when the user profile is fully loaded and ready to switch to. | 217 // Called when the user profile is fully loaded and ready to switch to. |
| 218 void OnUserProfileReadyToSwitch(Profile* profile); | 218 void OnUserProfileReadyToSwitch(Profile* profile); |
| 219 | 219 |
| 220 // Controller to launch ARC apps in deferred mode. | 220 // Controller to launch ARC apps in deferred mode. |
| 221 ArcAppDeferredLauncherController* GetArcDeferredLauncher(); | 221 ArcAppDeferredLauncherController* GetArcDeferredLauncher(); |
| 222 | 222 |
| 223 // Get the launch ID for a given shelf ID. | |
| 224 const std::string& GetLaunchIDForShelfID(const ash::ShelfID& id); | |
| 225 | |
| 226 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); | 223 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); |
| 227 | 224 |
| 228 // Sets the shelf auto-hide and/or alignment behavior from prefs. | 225 // Sets the shelf auto-hide and/or alignment behavior from prefs. |
| 229 void SetShelfAutoHideBehaviorFromPrefs(); | 226 void SetShelfAutoHideBehaviorFromPrefs(); |
| 230 void SetShelfAlignmentFromPrefs(); | 227 void SetShelfAlignmentFromPrefs(); |
| 231 void SetShelfBehaviorsFromPrefs(); | 228 void SetShelfBehaviorsFromPrefs(); |
| 232 | 229 |
| 233 // Temporarily prevent pinned shelf item changes from updating the sync model. | 230 // Temporarily prevent pinned shelf item changes from updating the sync model. |
| 234 using ScopedPinSyncDisabler = std::unique_ptr<base::AutoReset<bool>>; | 231 using ScopedPinSyncDisabler = std::unique_ptr<base::AutoReset<bool>>; |
| 235 ScopedPinSyncDisabler GetScopedPinSyncDisabler(); | 232 ScopedPinSyncDisabler GetScopedPinSyncDisabler(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 247 | 244 |
| 248 // Sets LauncherControllerHelper or AppIconLoader for test, taking ownership. | 245 // Sets LauncherControllerHelper or AppIconLoader for test, taking ownership. |
| 249 void SetLauncherControllerHelperForTest( | 246 void SetLauncherControllerHelperForTest( |
| 250 std::unique_ptr<LauncherControllerHelper> helper); | 247 std::unique_ptr<LauncherControllerHelper> helper); |
| 251 void SetAppIconLoadersForTest( | 248 void SetAppIconLoadersForTest( |
| 252 std::vector<std::unique_ptr<AppIconLoader>>& loaders); | 249 std::vector<std::unique_ptr<AppIconLoader>>& loaders); |
| 253 | 250 |
| 254 void SetProfileForTest(Profile* profile); | 251 void SetProfileForTest(Profile* profile); |
| 255 | 252 |
| 256 // Helpers that call through to corresponding ShelfModel functions. | 253 // Helpers that call through to corresponding ShelfModel functions. |
| 257 ash::ShelfID GetShelfIDForAppID(const std::string& app_id); | |
| 258 ash::ShelfID GetShelfIDForAppIDAndLaunchID(const std::string& app_id, | |
| 259 const std::string& launch_id); | |
| 260 const std::string& GetAppIDForShelfID(const ash::ShelfID& id); | |
| 261 void PinAppWithID(const std::string& app_id); | 254 void PinAppWithID(const std::string& app_id); |
| 262 bool IsAppPinned(const std::string& app_id); | 255 bool IsAppPinned(const std::string& app_id); |
| 263 void UnpinAppWithID(const std::string& app_id); | 256 void UnpinAppWithID(const std::string& app_id); |
| 264 | 257 |
| 265 // LauncherAppUpdater::Delegate: | 258 // LauncherAppUpdater::Delegate: |
| 266 void OnAppInstalled(content::BrowserContext* browser_context, | 259 void OnAppInstalled(content::BrowserContext* browser_context, |
| 267 const std::string& app_id) override; | 260 const std::string& app_id) override; |
| 268 void OnAppUpdated(content::BrowserContext* browser_context, | 261 void OnAppUpdated(content::BrowserContext* browser_context, |
| 269 const std::string& app_id) override; | 262 const std::string& app_id) override; |
| 270 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, | 263 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 using RunningAppListIds = std::vector<std::string>; | 443 using RunningAppListIds = std::vector<std::string>; |
| 451 using RunningAppListIdMap = std::map<std::string, RunningAppListIds>; | 444 using RunningAppListIdMap = std::map<std::string, RunningAppListIds>; |
| 452 RunningAppListIdMap last_used_running_application_order_; | 445 RunningAppListIdMap last_used_running_application_order_; |
| 453 | 446 |
| 454 base::WeakPtrFactory<ChromeLauncherController> weak_ptr_factory_; | 447 base::WeakPtrFactory<ChromeLauncherController> weak_ptr_factory_; |
| 455 | 448 |
| 456 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 449 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 457 }; | 450 }; |
| 458 | 451 |
| 459 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 452 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |