Chromium Code Reviews| 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 "base/callback.h" | |
| 9 #include "ui/aura_shell/aura_shell_export.h" | 10 #include "ui/aura_shell/aura_shell_export.h" |
| 10 | 11 |
| 11 namespace views { | 12 namespace views { |
| 12 class Widget; | 13 class Widget; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace aura_shell { | 16 namespace aura_shell { |
| 16 | 17 |
| 17 struct LauncherItem; | 18 struct LauncherItem; |
| 19 typedef base::Callback<void(views::Widget*)> SetWidgetCallback; | |
|
sky
2011/11/19 00:13:14
Move this inside of ShellDelegate.
xiyuan
2011/11/19 00:25:04
Done.
| |
| 18 | 20 |
| 19 // Delegate of the Shell. | 21 // Delegate of the Shell. |
| 20 class AURA_SHELL_EXPORT ShellDelegate { | 22 class AURA_SHELL_EXPORT ShellDelegate { |
| 21 public: | 23 public: |
| 22 // The Shell owns the delegate. | 24 // The Shell owns the delegate. |
| 23 virtual ~ShellDelegate() {} | 25 virtual ~ShellDelegate() {} |
| 24 | 26 |
| 25 // Invoked when the user clicks on button in the launcher to create a new | 27 // Invoked when the user clicks on button in the launcher to create a new |
| 26 // window. | 28 // window. |
| 27 virtual void CreateNewWindow() = 0; | 29 virtual void CreateNewWindow() = 0; |
| 28 | 30 |
| 29 // Invoked to create a new status area. Can return NULL. | 31 // Invoked to create a new status area. Can return NULL. |
| 30 virtual views::Widget* CreateStatusArea() = 0; | 32 virtual views::Widget* CreateStatusArea() = 0; |
| 31 | 33 |
| 32 // Invoked when the user clicks the app list button on the launcher. | 34 // Invoked to create app list widget. The Delegate calls the callback |
| 33 virtual void ShowApps() = 0; | 35 // when the widget is ready to show. |
| 36 virtual void RequestAppListWidget(const SetWidgetCallback& callback) = 0; | |
| 34 | 37 |
| 35 // Invoked when the user clicks on a window entry in the launcher. | 38 // Invoked when the user clicks on a window entry in the launcher. |
| 36 virtual void LauncherItemClicked(const LauncherItem& item) = 0; | 39 virtual void LauncherItemClicked(const LauncherItem& item) = 0; |
| 37 | 40 |
| 38 // Invoked when a window is added. If the delegate wants the launcher to show | 41 // Invoked when a window is added. If the delegate wants the launcher to show |
| 39 // an entry for |item->window| it should configure |item| appropriately and | 42 // an entry for |item->window| it should configure |item| appropriately and |
| 40 // return true. | 43 // return true. |
| 41 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; | 44 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 } // namespace aura_shell | 47 } // namespace aura_shell |
| 45 | 48 |
| 46 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ | 49 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ |
| OLD | NEW |