OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_SHELL_SHELL_DELEGATE_H_ | 5 #ifndef UI_AURA_SHELL_SHELL_DELEGATE_H_ |
6 #define UI_AURA_SHELL_SHELL_DELEGATE_H_ | 6 #define UI_AURA_SHELL_SHELL_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura_shell/aura_shell_export.h" | 9 #include "ui/aura_shell/aura_shell_export.h" |
10 | 10 |
| 11 namespace views { |
| 12 class Widget; |
| 13 } |
| 14 |
11 namespace aura_shell { | 15 namespace aura_shell { |
12 | 16 |
13 struct LauncherItem; | 17 struct LauncherItem; |
14 | 18 |
15 // Delegate of the Shell. | 19 // Delegate of the Shell. |
16 class AURA_SHELL_EXPORT ShellDelegate { | 20 class AURA_SHELL_EXPORT ShellDelegate { |
17 public: | 21 public: |
18 // The Shell owns the delegate. | 22 // The Shell owns the delegate. |
19 virtual ~ShellDelegate() {} | 23 virtual ~ShellDelegate() {} |
20 | 24 |
21 // Invoked when the user clicks on button in the launcher to create a new | 25 // Invoked when the user clicks on button in the launcher to create a new |
22 // window. | 26 // window. |
23 virtual void CreateNewWindow() = 0; | 27 virtual void CreateNewWindow() = 0; |
24 | 28 |
| 29 // Invoked to create a new status area. Can return NULL. |
| 30 virtual views::Widget* CreateStatusArea() = 0; |
| 31 |
25 // Invoked when the user clicks the app list button on the launcher. | 32 // Invoked when the user clicks the app list button on the launcher. |
26 virtual void ShowApps() = 0; | 33 virtual void ShowApps() = 0; |
27 | 34 |
28 // Invoked when the user clicks on a window entry in the launcher. | 35 // Invoked when the user clicks on a window entry in the launcher. |
29 virtual void LauncherItemClicked(const LauncherItem& item) = 0; | 36 virtual void LauncherItemClicked(const LauncherItem& item) = 0; |
30 | 37 |
31 // Invoked when a window is added. If the delegate wants the launcher to show | 38 // Invoked when a window is added. If the delegate wants the launcher to show |
32 // an entry for |item->window| it should configure |item| appropriately and | 39 // an entry for |item->window| it should configure |item| appropriately and |
33 // return true. | 40 // return true. |
34 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; | 41 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; |
35 }; | 42 }; |
36 | 43 |
37 } // namespace aura_shell | 44 } // namespace aura_shell |
38 | 45 |
39 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ | 46 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ |
OLD | NEW |