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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ~ChromeLauncherController() override; | 78 ~ChromeLauncherController() override; |
79 | 79 |
80 // Initializes this ChromeLauncherController. | 80 // Initializes this ChromeLauncherController. |
81 virtual void Init() = 0; | 81 virtual void Init() = 0; |
82 | 82 |
83 // Creates a new app item on the shelf for |controller|. | 83 // Creates a new app item on the shelf for |controller|. |
84 virtual ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, | 84 virtual ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, |
85 const std::string& app_id, | 85 const std::string& app_id, |
86 ash::ShelfItemStatus status) = 0; | 86 ash::ShelfItemStatus status) = 0; |
87 | 87 |
88 // A helper to get the shelf item with the given id, which must be valid. | 88 // Returns the shelf item with the given id, or null if |id| isn't found. |
89 virtual const ash::ShelfItem& GetItem(ash::ShelfID id) const = 0; | 89 virtual const ash::ShelfItem* GetItem(ash::ShelfID id) const = 0; |
90 | 90 |
91 // Updates the type of an item. | 91 // Updates the type of an item. |
92 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0; | 92 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0; |
93 | 93 |
94 // Updates the running status of an item. It will also update the status of | 94 // Updates the running status of an item. It will also update the status of |
95 // browsers shelf item if needed. | 95 // browsers shelf item if needed. |
96 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; | 96 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; |
97 | 97 |
98 // Updates the controller associated with id (which should be a shortcut). | 98 // Updates the controller associated with id (which should be a shortcut). |
99 // Takes ownership of |controller|. | 99 // Takes ownership of |controller|. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // An observer that manages the shelf title and icon for settings windows. | 317 // An observer that manages the shelf title and icon for settings windows. |
318 SettingsWindowObserver settings_window_observer_; | 318 SettingsWindowObserver settings_window_observer_; |
319 | 319 |
320 // Used to load the images for app items. | 320 // Used to load the images for app items. |
321 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 321 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
322 | 322 |
323 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 323 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
324 }; | 324 }; |
325 | 325 |
326 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 326 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |