| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; | 66 const ash::ShelfItem* GetItem(ash::ShelfID id) const override; |
| 67 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override; | 67 void SetItemType(ash::ShelfID id, ash::ShelfItemType type) override; |
| 68 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; | 68 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; |
| 69 void SetItemController(ash::ShelfID id, | 69 void SetItemController(ash::ShelfID id, |
| 70 LauncherItemController* controller) override; | 70 LauncherItemController* controller) override; |
| 71 void CloseLauncherItem(ash::ShelfID id) override; | 71 void CloseLauncherItem(ash::ShelfID id) override; |
| 72 void Pin(ash::ShelfID id) override; | 72 void Pin(ash::ShelfID id) override; |
| 73 void Unpin(ash::ShelfID id) override; | 73 void Unpin(ash::ShelfID id) override; |
| 74 bool IsPinned(ash::ShelfID id) override; | 74 bool IsPinned(ash::ShelfID id) override; |
| 75 void TogglePinned(ash::ShelfID id) override; | 75 void TogglePinned(ash::ShelfID id) override; |
| 76 bool IsPinnable(ash::ShelfID id) const override; | |
| 77 void LockV1AppWithID(const std::string& app_id) override; | 76 void LockV1AppWithID(const std::string& app_id) override; |
| 78 void UnlockV1AppWithID(const std::string& app_id) override; | 77 void UnlockV1AppWithID(const std::string& app_id) override; |
| 79 void Launch(ash::ShelfID id, int event_flags) override; | 78 void Launch(ash::ShelfID id, int event_flags) override; |
| 80 void Close(ash::ShelfID id) override; | 79 void Close(ash::ShelfID id) override; |
| 81 bool IsOpen(ash::ShelfID id) override; | 80 bool IsOpen(ash::ShelfID id) override; |
| 82 bool IsPlatformApp(ash::ShelfID id) override; | 81 bool IsPlatformApp(ash::ShelfID id) override; |
| 83 void ActivateApp(const std::string& app_id, | 82 void ActivateApp(const std::string& app_id, |
| 84 ash::LaunchSource source, | 83 ash::LaunchSource source, |
| 85 int event_flags) override; | 84 int event_flags) override; |
| 86 void SetLauncherItemImage(ash::ShelfID shelf_id, | 85 void SetLauncherItemImage(ash::ShelfID shelf_id, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 195 |
| 197 // Updates pin position for the item specified by |id| in sync model. | 196 // Updates pin position for the item specified by |id| in sync model. |
| 198 void SyncPinPosition(ash::ShelfID id); | 197 void SyncPinPosition(ash::ShelfID id); |
| 199 | 198 |
| 200 // Re-syncs shelf model. | 199 // Re-syncs shelf model. |
| 201 void UpdateAppLaunchersFromPref(); | 200 void UpdateAppLaunchersFromPref(); |
| 202 | 201 |
| 203 // Schedules re-sync of shelf model. | 202 // Schedules re-sync of shelf model. |
| 204 void ScheduleUpdateAppLaunchersFromPref(); | 203 void ScheduleUpdateAppLaunchersFromPref(); |
| 205 | 204 |
| 205 // Update the policy-pinned flag for each shelf item. |
| 206 void UpdatePolicyPinnedAppsFromPrefs(); |
| 207 |
| 206 // Sets whether the virtual keyboard is enabled from prefs. | 208 // Sets whether the virtual keyboard is enabled from prefs. |
| 207 void SetVirtualKeyboardBehaviorFromPrefs(); | 209 void SetVirtualKeyboardBehaviorFromPrefs(); |
| 208 | 210 |
| 209 // Returns the shelf item status for the given |app_id|, which can be either | 211 // Returns the shelf item status for the given |app_id|, which can be either |
| 210 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an | 212 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an |
| 211 // app) or STATUS_CLOSED. | 213 // app) or STATUS_CLOSED. |
| 212 ash::ShelfItemStatus GetAppState(const std::string& app_id); | 214 ash::ShelfItemStatus GetAppState(const std::string& app_id); |
| 213 | 215 |
| 214 // Creates an app launcher to insert at |index|. Note that |index| may be | 216 // Creates an app launcher to insert at |index|. Note that |index| may be |
| 215 // adjusted by the model to meet ordering constraints. | 217 // adjusted by the model to meet ordering constraints. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 typedef std::vector<std::string> RunningAppListIds; | 307 typedef std::vector<std::string> RunningAppListIds; |
| 306 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 308 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 307 RunningAppListIdMap last_used_running_application_order_; | 309 RunningAppListIdMap last_used_running_application_order_; |
| 308 | 310 |
| 309 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; | 311 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; |
| 310 | 312 |
| 311 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 313 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
| 312 }; | 314 }; |
| 313 | 315 |
| 314 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 316 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| OLD | NEW |