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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Returns the shelf item with the given id, or null if |id| isn't found. | 82 // Returns the shelf item with the given id, or null if |id| isn't found. |
83 virtual const ash::ShelfItem* GetItem(ash::ShelfID id) const = 0; | 83 virtual const ash::ShelfItem* GetItem(ash::ShelfID id) const = 0; |
84 | 84 |
85 // Updates the type of an item. | 85 // Updates the type of an item. |
86 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0; | 86 virtual void SetItemType(ash::ShelfID id, ash::ShelfItemType type) = 0; |
87 | 87 |
88 // Updates the running status of an item. It will also update the status of | 88 // Updates the running status of an item. It will also update the status of |
89 // browsers shelf item if needed. | 89 // browsers shelf item if needed. |
90 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; | 90 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; |
91 | 91 |
| 92 // Updates the delegate associated with id (which should be a shortcut). |
| 93 virtual void SetShelfItemDelegate( |
| 94 ash::ShelfID id, |
| 95 std::unique_ptr<ash::ShelfItemDelegate> item_delegate) = 0; |
| 96 |
92 // Closes or unpins the shelf item. | 97 // Closes or unpins the shelf item. |
93 virtual void CloseLauncherItem(ash::ShelfID id) = 0; | 98 virtual void CloseLauncherItem(ash::ShelfID id) = 0; |
94 | 99 |
95 // Returns true if the item identified by |id| is pinned. | 100 // Returns true if the item identified by |id| is pinned. |
96 virtual bool IsPinned(ash::ShelfID id) = 0; | 101 virtual bool IsPinned(ash::ShelfID id) = 0; |
97 | 102 |
98 // Set the shelf item status for the V1 application with the given |app_id|. | 103 // Set the shelf item status for the V1 application with the given |app_id|. |
99 // Adds or removes an item as needed to respect the running and pinned state. | 104 // Adds or removes an item as needed to respect the running and pinned state. |
100 virtual void SetV1AppStatus(const std::string& app_id, | 105 virtual void SetV1AppStatus(const std::string& app_id, |
101 ash::ShelfItemStatus status) = 0; | 106 ash::ShelfItemStatus status) = 0; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 195 |
191 // Get the title for the applicatoin list entry for |web_contents|. | 196 // Get the title for the applicatoin list entry for |web_contents|. |
192 // If |web_contents| has not loaded, returns "Net Tab". | 197 // If |web_contents| has not loaded, returns "Net Tab". |
193 virtual base::string16 GetAppListTitle( | 198 virtual base::string16 GetAppListTitle( |
194 content::WebContents* web_contents) const = 0; | 199 content::WebContents* web_contents) const = 0; |
195 | 200 |
196 // Returns the ash::ShelfItemDelegate of BrowserShortcut. | 201 // Returns the ash::ShelfItemDelegate of BrowserShortcut. |
197 virtual BrowserShortcutLauncherItemController* | 202 virtual BrowserShortcutLauncherItemController* |
198 GetBrowserShortcutLauncherItemController() = 0; | 203 GetBrowserShortcutLauncherItemController() = 0; |
199 | 204 |
| 205 virtual ash::ShelfItemDelegate* GetShelfItemDelegate( |
| 206 const ash::ShelfID id) = 0; |
| 207 |
200 // Check if the shelf visibility (location, visibility) will change with a new | 208 // Check if the shelf visibility (location, visibility) will change with a new |
201 // user profile or not. However, since the full visibility calculation of the | 209 // user profile or not. However, since the full visibility calculation of the |
202 // shelf cannot be performed here, this is only a probability used for | 210 // shelf cannot be performed here, this is only a probability used for |
203 // animation predictions. | 211 // animation predictions. |
204 virtual bool ShelfBoundsChangesProbablyWithUser( | 212 virtual bool ShelfBoundsChangesProbablyWithUser( |
205 ash::WmShelf* shelf, | 213 ash::WmShelf* shelf, |
206 const AccountId& account_id) const = 0; | 214 const AccountId& account_id) const = 0; |
207 | 215 |
208 // Called when the user profile is fully loaded and ready to switch to. | 216 // Called when the user profile is fully loaded and ready to switch to. |
209 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0; | 217 virtual void OnUserProfileReadyToSwitch(Profile* profile) = 0; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // An observer that manages the shelf title and icon for settings windows. | 300 // An observer that manages the shelf title and icon for settings windows. |
293 SettingsWindowObserver settings_window_observer_; | 301 SettingsWindowObserver settings_window_observer_; |
294 | 302 |
295 // Used to load the images for app items. | 303 // Used to load the images for app items. |
296 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 304 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
297 | 305 |
298 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 306 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
299 }; | 307 }; |
300 | 308 |
301 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 309 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |