OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 9 |
10 #include "ash/launcher/launcher_delegate.h" | 10 #include "ash/launcher/launcher_delegate.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Returns true if the item identified by |id| is pinned. | 129 // Returns true if the item identified by |id| is pinned. |
130 virtual bool IsPinned(ash::LauncherID id) = 0; | 130 virtual bool IsPinned(ash::LauncherID id) = 0; |
131 | 131 |
132 // Pins/unpins the specified id. | 132 // Pins/unpins the specified id. |
133 virtual void TogglePinned(ash::LauncherID id) = 0; | 133 virtual void TogglePinned(ash::LauncherID id) = 0; |
134 | 134 |
135 // Returns true if the specified item can be pinned or unpinned. Only apps can | 135 // Returns true if the specified item can be pinned or unpinned. Only apps can |
136 // be pinned. | 136 // be pinned. |
137 virtual bool IsPinnable(ash::LauncherID id) const = 0; | 137 virtual bool IsPinnable(ash::LauncherID id) const = 0; |
138 | 138 |
| 139 // If there is no launcher item in the launcher for application |app_id|, one |
| 140 // gets created. The (existing or created) launcher items get then locked |
| 141 // against a users un-pinning removal. |
| 142 virtual void LockV1AppWithID(const std::string& app_id) = 0; |
| 143 |
| 144 // A previously locked launcher item of type |app_id| gets unlocked. If the |
| 145 // lock count reaches 0 and the item is not pinned it will go away. |
| 146 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; |
| 147 |
139 // Requests that the launcher item controller specified by |id| open a new | 148 // Requests that the launcher item controller specified by |id| open a new |
140 // instance of the app. |event_flags| holds the flags of the event which | 149 // instance of the app. |event_flags| holds the flags of the event which |
141 // triggered this command. | 150 // triggered this command. |
142 virtual void Launch(ash::LauncherID id, int event_flags) = 0; | 151 virtual void Launch(ash::LauncherID id, int event_flags) = 0; |
143 | 152 |
144 // Closes the specified item. | 153 // Closes the specified item. |
145 virtual void Close(ash::LauncherID id) = 0; | 154 virtual void Close(ash::LauncherID id) = 0; |
146 | 155 |
147 // Returns true if the specified item is open. | 156 // Returns true if the specified item is open. |
148 virtual bool IsOpen(ash::LauncherID id) = 0; | 157 virtual bool IsOpen(ash::LauncherID id) = 0; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0; | 292 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0; |
284 virtual void SetAppIconLoaderForTest(ash::AppIconLoader* loader) = 0; | 293 virtual void SetAppIconLoaderForTest(ash::AppIconLoader* loader) = 0; |
285 virtual const std::string& GetAppIdFromLauncherIdForTest( | 294 virtual const std::string& GetAppIdFromLauncherIdForTest( |
286 ash::LauncherID id) = 0; | 295 ash::LauncherID id) = 0; |
287 | 296 |
288 private: | 297 private: |
289 static ChromeLauncherController* instance_; | 298 static ChromeLauncherController* instance_; |
290 }; | 299 }; |
291 | 300 |
292 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 301 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |