| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Returns true if the specified item is open. | 156 // Returns true if the specified item is open. |
| 157 bool IsOpen(ash::LauncherID id); | 157 bool IsOpen(ash::LauncherID id); |
| 158 | 158 |
| 159 // Returns the launch type of app for the specified id. | 159 // Returns the launch type of app for the specified id. |
| 160 extensions::ExtensionPrefs::LaunchType GetLaunchType(ash::LauncherID id); | 160 extensions::ExtensionPrefs::LaunchType GetLaunchType(ash::LauncherID id); |
| 161 | 161 |
| 162 // Returns the id of the app for the specified tab. | 162 // Returns the id of the app for the specified tab. |
| 163 std::string GetAppID(TabContents* tab); | 163 std::string GetAppID(TabContents* tab); |
| 164 | 164 |
| 165 ash::LauncherID GetLauncherIDForAppID(const std::string& app_id); | 165 ash::LauncherID GetLauncherIDForAppID(const std::string& app_id); |
| 166 std::string GetAppIDForLauncherID(ash::LauncherID id); |
| 166 | 167 |
| 167 // Sets the image for an app tab. This is intended to be invoked from the | 168 // Sets the image for an app tab. This is intended to be invoked from the |
| 168 // AppIconLoader. | 169 // AppIconLoader. |
| 169 void SetAppImage(const std::string& app_id, const gfx::ImageSkia& image); | 170 void SetAppImage(const std::string& app_id, const gfx::ImageSkia& image); |
| 170 | 171 |
| 171 // Returns true if a pinned launcher item with given |app_id| could be found. | 172 // Returns true if a pinned launcher item with given |app_id| could be found. |
| 172 bool IsAppPinned(const std::string& app_id); | 173 bool IsAppPinned(const std::string& app_id); |
| 173 | 174 |
| 174 // Pins an app with |app_id| to launcher. If there is a running instance in | 175 // Pins an app with |app_id| to launcher. If there is a running instance in |
| 175 // launcher, the running instance is pinned. If there is no running instance, | 176 // launcher, the running instance is pinned. If there is no running instance, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 351 |
| 351 PrefChangeRegistrar pref_change_registrar_; | 352 PrefChangeRegistrar pref_change_registrar_; |
| 352 | 353 |
| 353 ProfileSyncService* observed_sync_service_; | 354 ProfileSyncService* observed_sync_service_; |
| 354 base::OneShotTimer<ChromeLauncherController> loading_timer_; | 355 base::OneShotTimer<ChromeLauncherController> loading_timer_; |
| 355 | 356 |
| 356 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 357 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 357 }; | 358 }; |
| 358 | 359 |
| 359 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 360 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |