Chromium Code Reviews| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 | 110 |
| 111 // Pins/unpins the specified id. | 111 // Pins/unpins the specified id. |
| 112 virtual void TogglePinned(ash::ShelfID id) = 0; | 112 virtual void TogglePinned(ash::ShelfID id) = 0; |
| 113 | 113 |
| 114 // Returns true if the specified item can be pinned or unpinned. Only apps can | 114 // Returns true if the specified item can be pinned or unpinned. Only apps can |
| 115 // be pinned. | 115 // be pinned. |
| 116 virtual bool IsPinnable(ash::ShelfID id) const = 0; | 116 virtual bool IsPinnable(ash::ShelfID id) const = 0; |
| 117 | 117 |
| 118 // If there is no shelf item in the shelf for application |app_id|, one | 118 // If there is no shelf item in the shelf for application |app_id|, one |
| 119 // gets created. The (existing or created) shelf items get then locked | 119 // gets created. The (existing or created) shelf items get then locked |
| 120 // against a users un-pinning removal. | 120 // against a users un-pinning removal. |
|
James Cook
2016/11/28 22:57:47
Did you ever figure out what "locking" is used for
msw
2016/11/28 23:47:41
The comment seems reasonable (albeit incomplete),
| |
| 121 virtual void LockV1AppWithID(const std::string& app_id) = 0; | 121 virtual void LockV1AppWithID(const std::string& app_id) = 0; |
| 122 | 122 |
| 123 // A previously locked shelf item of type |app_id| gets unlocked. If the | 123 // A previously locked shelf item of type |app_id| gets unlocked. If the |
| 124 // lock count reaches 0 and the item is not pinned it will go away. | 124 // lock count reaches 0 and the item is not pinned it will go away. |
| 125 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; | 125 virtual void UnlockV1AppWithID(const std::string& app_id) = 0; |
| 126 | 126 |
| 127 // Requests that the shelf item controller specified by |id| open a new | 127 // Requests that the shelf item controller specified by |id| open a new |
| 128 // instance of the app. |event_flags| holds the flags of the event which | 128 // instance of the app. |event_flags| holds the flags of the event which |
| 129 // triggered this command. | 129 // triggered this command. |
| 130 virtual void Launch(ash::ShelfID id, int event_flags) = 0; | 130 virtual void Launch(ash::ShelfID id, int event_flags) = 0; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 151 ash::LaunchSource source, | 151 ash::LaunchSource source, |
| 152 int event_flags) = 0; | 152 int event_flags) = 0; |
| 153 | 153 |
| 154 // Returns the launch type of app for the specified id. | 154 // Returns the launch type of app for the specified id. |
| 155 virtual extensions::LaunchType GetLaunchType(ash::ShelfID id) = 0; | 155 virtual extensions::LaunchType GetLaunchType(ash::ShelfID id) = 0; |
| 156 | 156 |
| 157 // Set the image for a specific shelf item (e.g. when set by the app). | 157 // Set the image for a specific shelf item (e.g. when set by the app). |
| 158 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, | 158 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, |
| 159 const gfx::ImageSkia& image) = 0; | 159 const gfx::ImageSkia& image) = 0; |
| 160 | 160 |
| 161 // Find out if the given application |id| is a windowed app item and not a | |
| 162 // pinned item in the shelf. | |
| 163 virtual bool IsWindowedAppInLauncher(const std::string& app_id) = 0; | |
| 164 | |
| 165 // Updates the launch type of the app for the specified id to |launch_type|. | 161 // Updates the launch type of the app for the specified id to |launch_type|. |
| 166 virtual void SetLaunchType(ash::ShelfID id, | 162 virtual void SetLaunchType(ash::ShelfID id, |
| 167 extensions::LaunchType launch_type) = 0; | 163 extensions::LaunchType launch_type) = 0; |
| 168 | 164 |
| 169 // Notify the controller that the state of an non platform app's tabs | 165 // Notify the controller that the state of an non platform app's tabs |
| 170 // have changed, | 166 // have changed, |
| 171 virtual void UpdateAppState(content::WebContents* contents, | 167 virtual void UpdateAppState(content::WebContents* contents, |
| 172 AppState app_state) = 0; | 168 AppState app_state) = 0; |
| 173 | 169 |
| 174 // Returns ShelfID for |contents|. If |contents| is not an app or is not | 170 // Returns ShelfID for |contents|. If |contents| is not an app or is not |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 // An observer that manages the shelf title and icon for settings windows. | 311 // An observer that manages the shelf title and icon for settings windows. |
| 316 SettingsWindowObserver settings_window_observer_; | 312 SettingsWindowObserver settings_window_observer_; |
| 317 | 313 |
| 318 // Used to load the images for app items. | 314 // Used to load the images for app items. |
| 319 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 315 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
| 320 | 316 |
| 321 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 317 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 322 }; | 318 }; |
| 323 | 319 |
| 324 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 320 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |