| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 // Returns true if the specified item is for a platform app. | 142 // Returns true if the specified item is for a platform app. |
| 143 virtual bool IsPlatformApp(ash::ShelfID id) = 0; | 143 virtual bool IsPlatformApp(ash::ShelfID id) = 0; |
| 144 | 144 |
| 145 // Opens a new instance of the application identified by |app_id|. | 145 // Opens a new instance of the application identified by |app_id|. |
| 146 // Used by the app-list, and by pinned-app shelf items. | 146 // Used by the app-list, and by pinned-app shelf items. |
| 147 void LaunchApp(const std::string& app_id, | 147 void LaunchApp(const std::string& app_id, |
| 148 ash::LaunchSource source, | 148 ash::LaunchSource source, |
| 149 int event_flags); | 149 int event_flags); |
| 150 | 150 |
| 151 // As above but includes |launch_id|, an id that can be passed to an app when |
| 152 // launched in order to support multiple shelf items per app. |
| 153 void LaunchAppWithLaunchId(const std::string& app_id, |
| 154 const std::string& launch_id, |
| 155 ash::LaunchSource source, |
| 156 int event_flags); |
| 157 |
| 151 // If |app_id| is running, reactivates the app's most recently active window, | 158 // If |app_id| is running, reactivates the app's most recently active window, |
| 152 // otherwise launches and activates the app. | 159 // otherwise launches and activates the app. |
| 153 // Used by the app-list, and by pinned-app shelf items. | 160 // Used by the app-list, and by pinned-app shelf items. |
| 154 virtual void ActivateApp(const std::string& app_id, | 161 virtual void ActivateApp(const std::string& app_id, |
| 155 ash::LaunchSource source, | 162 ash::LaunchSource source, |
| 156 int event_flags) = 0; | 163 int event_flags) = 0; |
| 157 | 164 |
| 158 // Set the image for a specific shelf item (e.g. when set by the app). | 165 // Set the image for a specific shelf item (e.g. when set by the app). |
| 159 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, | 166 virtual void SetLauncherItemImage(ash::ShelfID shelf_id, |
| 160 const gfx::ImageSkia& image) = 0; | 167 const gfx::ImageSkia& image) = 0; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // An observer that manages the shelf title and icon for settings windows. | 316 // An observer that manages the shelf title and icon for settings windows. |
| 310 SettingsWindowObserver settings_window_observer_; | 317 SettingsWindowObserver settings_window_observer_; |
| 311 | 318 |
| 312 // Used to load the images for app items. | 319 // Used to load the images for app items. |
| 313 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 320 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; |
| 314 | 321 |
| 315 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 322 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 316 }; | 323 }; |
| 317 | 324 |
| 318 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 325 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |