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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // TODO(skuhne): Pass in scoped_ptr to make ownership clear. | 93 // TODO(skuhne): Pass in scoped_ptr to make ownership clear. |
94 virtual void SetItemController(ash::ShelfID id, | 94 virtual void SetItemController(ash::ShelfID id, |
95 LauncherItemController* controller) = 0; | 95 LauncherItemController* controller) = 0; |
96 | 96 |
97 // Closes or unpins the shelf item. | 97 // Closes or unpins the shelf item. |
98 virtual void CloseLauncherItem(ash::ShelfID id) = 0; | 98 virtual void CloseLauncherItem(ash::ShelfID id) = 0; |
99 | 99 |
100 // Returns true if the item identified by |id| is pinned. | 100 // Returns true if the item identified by |id| is pinned. |
101 virtual bool IsPinned(ash::ShelfID id) = 0; | 101 virtual bool IsPinned(ash::ShelfID id) = 0; |
102 | 102 |
103 // If there is no item in the shelf for application |app_id|, one is created. | 103 // Set the shelf item status for the V1 application with the given |app_id|. |
104 // The (existing or created) shelf items get then locked against a user's | 104 // Adds or removes an item as needed to respect the running and pinned state. |
105 // un-pinning removal. Used for V1 apps opened as windows that aren't pinned. | 105 virtual void SetV1AppStatus(const std::string& app_id, |
106 virtual void LockV1AppWithID(const std::string& app_id) = 0; | 106 ash::ShelfItemStatus status) = 0; |
107 | |
108 // A previously locked shelf item of type |app_id| gets unlocked. If the | |
109 // lock count reaches 0 and the item is not pinned it will go away. | |
110 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; | |
111 | 107 |
112 // Requests that the shelf item controller specified by |id| open a new | 108 // Requests that the shelf item controller specified by |id| open a new |
113 // instance of the app. |event_flags| holds the flags of the event which | 109 // instance of the app. |event_flags| holds the flags of the event which |
114 // triggered this command. | 110 // triggered this command. |
115 virtual void Launch(ash::ShelfID id, int event_flags) = 0; | 111 virtual void Launch(ash::ShelfID id, int event_flags) = 0; |
116 | 112 |
117 // Closes the specified item. | 113 // Closes the specified item. |
118 virtual void Close(ash::ShelfID id) = 0; | 114 virtual void Close(ash::ShelfID id) = 0; |
119 | 115 |
120 // Returns true if the specified item is open. | 116 // Returns true if the specified item is open. |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 // 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. |
305 SettingsWindowObserver settings_window_observer_; | 301 SettingsWindowObserver settings_window_observer_; |
306 | 302 |
307 // Used to load the images for app items. | 303 // Used to load the images for app items. |
308 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 304 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
309 | 305 |
310 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 306 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
311 }; | 307 }; |
312 | 308 |
313 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 309 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |