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 | 10 |
11 namespace ash { | 11 namespace ash { |
12 class Launcher; | 12 class Launcher; |
13 | 13 |
14 // Delegate for the Launcher. | 14 // Delegate for the Launcher. |
15 class ASH_EXPORT LauncherDelegate { | 15 class ASH_EXPORT LauncherDelegate { |
16 public: | 16 public: |
17 // Launcher owns the delegate. | 17 // Launcher owns the delegate. |
18 virtual ~LauncherDelegate() {} | 18 virtual ~LauncherDelegate() {} |
19 | 19 |
20 // Returns the id of the item associated with the specified window, or 0 if | 20 // Returns the id of the item associated with the specified window, or 0 if |
21 // there isn't one. | 21 // there isn't one. |
22 // Note: Windows of tabbed browsers will return the |LauncherID| of the | 22 // Note: Windows of tabbed browsers will return the |LauncherID| of the |
23 // currently active tab or selected tab. | 23 // currently active tab or selected tab. |
| 24 // TODO(simon.hong81): Remove this and handle in LauncherItemDelegateManager. |
24 virtual LauncherID GetIDByWindow(aura::Window* window) = 0; | 25 virtual LauncherID GetIDByWindow(aura::Window* window) = 0; |
25 | 26 |
26 // Callback used to allow delegate to perform initialization actions that | 27 // Callback used to allow delegate to perform initialization actions that |
27 // depend on the Launcher being in a known state. | 28 // depend on the Launcher being in a known state. |
28 virtual void OnLauncherCreated(Launcher* launcher) = 0; | 29 virtual void OnLauncherCreated(Launcher* launcher) = 0; |
29 | 30 |
30 // Callback used to inform the delegate that a specific launcher no longer | 31 // Callback used to inform the delegate that a specific launcher no longer |
31 // exists. | 32 // exists. |
32 virtual void OnLauncherDestroyed(Launcher* launcher) = 0; | 33 virtual void OnLauncherDestroyed(Launcher* launcher) = 0; |
33 | 34 |
(...skipping 11 matching lines...) Expand all Loading... |
45 // Check if the app with |app_id_| is pinned to the launcher. | 46 // Check if the app with |app_id_| is pinned to the launcher. |
46 virtual bool IsAppPinned(const std::string& app_id) = 0; | 47 virtual bool IsAppPinned(const std::string& app_id) = 0; |
47 | 48 |
48 // Unpins app item with |app_id|. | 49 // Unpins app item with |app_id|. |
49 virtual void UnpinAppWithID(const std::string& app_id) = 0; | 50 virtual void UnpinAppWithID(const std::string& app_id) = 0; |
50 }; | 51 }; |
51 | 52 |
52 } // namespace ash | 53 } // namespace ash |
53 | 54 |
54 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 55 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
OLD | NEW |