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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 // Closes the specified item. | 128 // Closes the specified item. |
| 129 virtual void Close(ash::ShelfID id) = 0; | 129 virtual void Close(ash::ShelfID id) = 0; |
| 130 | 130 |
| 131 // Returns true if the specified item is open. | 131 // Returns true if the specified item is open. |
| 132 virtual bool IsOpen(ash::ShelfID id) = 0; | 132 virtual bool IsOpen(ash::ShelfID id) = 0; |
| 133 | 133 |
| 134 // Returns true if the specified item is for a platform app. | 134 // Returns true if the specified item is for a platform app. |
| 135 virtual bool IsPlatformApp(ash::ShelfID id) = 0; | 135 virtual bool IsPlatformApp(ash::ShelfID id) = 0; |
| 136 | 136 |
| 137 // Opens a new instance of the application identified by |app_id|. | 137 // Opens a new instance of the application identified by |app_id|. |
| 138 // The |launch_id| is used to support multiple shelf items per app. | |
| 138 // Used by the app-list, and by pinned-app shelf items. | 139 // Used by the app-list, and by pinned-app shelf items. |
| 139 void LaunchApp(const std::string& app_id, | 140 void LaunchApp(const std::string& app_id, |
| 141 const std::string& launch_id, | |
|
James Cook
2017/02/08 17:37:00
I think this would be better if it took an AppLaun
khmel
2017/02/08 17:41:27
+1 to this. There is also CL: https://codereview.c
msw
2017/02/09 00:42:00
Done.
| |
| 140 ash::LaunchSource source, | 142 ash::LaunchSource source, |
| 141 int event_flags); | 143 int event_flags); |
| 142 | 144 |
| 143 // As above but includes |launch_id|, an id that can be passed to an app when | |
| 144 // launched in order to support multiple shelf items per app. | |
| 145 void LaunchAppWithLaunchId(const std::string& app_id, | |
| 146 const std::string& launch_id, | |
| 147 ash::LaunchSource source, | |
| 148 int event_flags); | |
| 149 | |
| 150 // If |app_id| is running, reactivates the app's most recently active window, | 145 // If |app_id| is running, reactivates the app's most recently active window, |
| 151 // otherwise launches and activates the app. | 146 // otherwise launches and activates the app. |
| 152 // Used by the app-list, and by pinned-app shelf items. | 147 // Used by the app-list, and by pinned-app shelf items. |
| 153 virtual void ActivateApp(const std::string& app_id, | 148 virtual void ActivateApp(const std::string& app_id, |
| 154 ash::LaunchSource source, | 149 ash::LaunchSource source, |
| 155 int event_flags) = 0; | 150 int event_flags) = 0; |
| 156 | 151 |
| 157 // Set the image for a specific shelf item (e.g. when set by the app). | 152 // Set the image for a specific shelf item (e.g. when set by the app). |
| 158 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, | 153 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, |
| 159 const gfx::ImageSkia& image) = 0; | 154 const gfx::ImageSkia& image) = 0; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 // An observer that manages the shelf title and icon for settings windows. | 310 // An observer that manages the shelf title and icon for settings windows. |
| 316 SettingsWindowObserver settings_window_observer_; | 311 SettingsWindowObserver settings_window_observer_; |
| 317 | 312 |
| 318 // Used to load the images for app items. | 313 // Used to load the images for app items. |
| 319 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 314 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
| 320 | 315 |
| 321 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 316 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 322 }; | 317 }; |
| 323 | 318 |
| 324 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 319 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |