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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Creates a new app item on the shelf for |controller|. | 71 // Creates a new app item on the shelf for |controller|. |
72 virtual ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, | 72 virtual ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, |
73 const std::string& app_id, | 73 const std::string& app_id, |
74 ash::ShelfItemStatus status) = 0; | 74 ash::ShelfItemStatus status) = 0; |
75 | 75 |
76 // Updates the running status of an item. It will also update the status of | 76 // Updates the running status of an item. It will also update the status of |
77 // browsers shelf item if needed. | 77 // browsers shelf item if needed. |
78 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; | 78 virtual void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) = 0; |
79 | 79 |
80 // Updates the controller associated with id (which should be a shortcut). | 80 // Updates the controller associated with id (which should be a shortcut). |
81 // |controller| will be owned by the |ChromeLauncherController| and then | 81 // Takes ownership of |controller|. |
82 // passed on to |ShelfItemDelegateManager|. | |
83 // TODO(skuhne): Pass in scoped_ptr to make ownership clear. | 82 // TODO(skuhne): Pass in scoped_ptr to make ownership clear. |
84 virtual void SetItemController(ash::ShelfID id, | 83 virtual void SetItemController(ash::ShelfID id, |
85 LauncherItemController* controller) = 0; | 84 LauncherItemController* controller) = 0; |
86 | 85 |
87 // Closes or unpins the shelf item. | 86 // Closes or unpins the shelf item. |
88 virtual void CloseLauncherItem(ash::ShelfID id) = 0; | 87 virtual void CloseLauncherItem(ash::ShelfID id) = 0; |
89 | 88 |
90 // Pins the specified id. Currently only supports platform apps. | 89 // Pins the specified id. Currently only supports platform apps. |
91 virtual void Pin(ash::ShelfID id) = 0; | 90 virtual void Pin(ash::ShelfID id) = 0; |
92 | 91 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 protected: | 245 protected: |
247 ChromeLauncherController(); | 246 ChromeLauncherController(); |
248 | 247 |
249 private: | 248 private: |
250 static ChromeLauncherController* instance_; | 249 static ChromeLauncherController* instance_; |
251 | 250 |
252 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 251 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
253 }; | 252 }; |
254 | 253 |
255 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 254 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |