summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell/shell_delegate.h
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 22:52:44 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 22:52:44 +0000
commitae4987d641566c6036fc10e9a284df687d8db4ab (patch)
treebc7f62e7bcf10b23102bd8a4e53fcc57b6d8462b /ui/aura_shell/shell_delegate.h
parent8e937860d73f45a2fde92a736fd5f43a9e35e185 (diff)
downloadchromium_src-ae4987d641566c6036fc10e9a284df687d8db4ab.zip
chromium_src-ae4987d641566c6036fc10e9a284df687d8db4ab.tar.gz
chromium_src-ae4987d641566c6036fc10e9a284df687d8db4ab.tar.bz2
[Aura] Refactor and update app list window.
- Move showing, dimissing, animation observer, click monitoring code tha into an AppList controller in aura_shell; - Change ShellDelegate::ShowApps to an inteface to request app list widget and having a callback to notify app list controller when the widget is ready; - Click outside to dismiss the window. - Hide default container when app list is visible; BUG=98308 TEST=Verify click outside applist window to dismiss it. Browser windows should be hidden when app list window is shown and should be visible when app list is gone. Review URL: http://codereview.chromium.org/8558031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell/shell_delegate.h')
-rw-r--r--ui/aura_shell/shell_delegate.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/aura_shell/shell_delegate.h b/ui/aura_shell/shell_delegate.h
index b316669..28eb602 100644
--- a/ui/aura_shell/shell_delegate.h
+++ b/ui/aura_shell/shell_delegate.h
@@ -6,6 +6,7 @@
#define UI_AURA_SHELL_SHELL_DELEGATE_H_
#pragma once
+#include "base/callback.h"
#include "ui/aura_shell/aura_shell_export.h"
namespace views {
@@ -19,6 +20,9 @@ struct LauncherItem;
// Delegate of the Shell.
class AURA_SHELL_EXPORT ShellDelegate {
public:
+ // Callback to pass back a widget used by RequestAppListWidget.
+ typedef base::Callback<void(views::Widget*)> SetWidgetCallback;
+
// The Shell owns the delegate.
virtual ~ShellDelegate() {}
@@ -29,8 +33,9 @@ class AURA_SHELL_EXPORT ShellDelegate {
// Invoked to create a new status area. Can return NULL.
virtual views::Widget* CreateStatusArea() = 0;
- // Invoked when the user clicks the app list button on the launcher.
- virtual void ShowApps() = 0;
+ // Invoked to create app list widget. The Delegate calls the callback
+ // when the widget is ready to show.
+ virtual void RequestAppListWidget(const SetWidgetCallback& callback) = 0;
// Invoked when the user clicks on a window entry in the launcher.
virtual void LauncherItemClicked(const LauncherItem& item) = 0;