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 ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
6 #define ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Callback used to allow delegate to perform initialization actions that | 94 // Callback used to allow delegate to perform initialization actions that |
95 // depend on the Launcher being in a known state. | 95 // depend on the Launcher being in a known state. |
96 virtual void OnLauncherCreated(Launcher* launcher) = 0; | 96 virtual void OnLauncherCreated(Launcher* launcher) = 0; |
97 | 97 |
98 // Callback used to inform the delegate that a specific launcher no longer | 98 // Callback used to inform the delegate that a specific launcher no longer |
99 // exists. | 99 // exists. |
100 virtual void OnLauncherDestroyed(Launcher* launcher) = 0; | 100 virtual void OnLauncherDestroyed(Launcher* launcher) = 0; |
101 | 101 |
102 // True if the running launcher is the per application launcher. | 102 // True if the running launcher is the per application launcher. |
103 virtual bool IsPerAppLauncher() = 0; | 103 virtual bool IsPerAppLauncher() = 0; |
| 104 |
| 105 // Get the launcher ID from an application ID. |
| 106 virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) = 0; |
| 107 |
| 108 // Pins an app with |app_id| to launcher. A running instance will get pinned. |
| 109 // In case there is no running instance a new launcher item is created and |
| 110 // pinned. |
| 111 virtual void PinAppWithID(const std::string& app_id) = 0; |
| 112 |
| 113 // Unpins any app item(s) whose id is |app_id|. The new launcher will collect |
| 114 // all items under one item, the old launcher might have multiple items. |
| 115 virtual void UnpinAppsWithID(const std::string& app_id) = 0; |
104 }; | 116 }; |
105 | 117 |
106 } // namespace ash | 118 } // namespace ash |
107 | 119 |
108 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 120 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
OLD | NEW |