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