Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: ui/aura_shell/shell_delegate.h

Issue 8558031: [Aura] Refactor and update app list window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync, change initial size close to final size to avoid CardSlider resize animation Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura_shell/shell.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
18 19
19 // Delegate of the Shell. 20 // Delegate of the Shell.
20 class AURA_SHELL_EXPORT ShellDelegate { 21 class AURA_SHELL_EXPORT ShellDelegate {
21 public: 22 public:
23 // Callback to pass back a widget used by RequestAppListWidget.
24 typedef base::Callback<void(views::Widget*)> SetWidgetCallback;
25
22 // The Shell owns the delegate. 26 // The Shell owns the delegate.
23 virtual ~ShellDelegate() {} 27 virtual ~ShellDelegate() {}
24 28
25 // Invoked when the user clicks on button in the launcher to create a new 29 // Invoked when the user clicks on button in the launcher to create a new
26 // window. 30 // window.
27 virtual void CreateNewWindow() = 0; 31 virtual void CreateNewWindow() = 0;
28 32
29 // Invoked to create a new status area. Can return NULL. 33 // Invoked to create a new status area. Can return NULL.
30 virtual views::Widget* CreateStatusArea() = 0; 34 virtual views::Widget* CreateStatusArea() = 0;
31 35
32 // Invoked when the user clicks the app list button on the launcher. 36 // Invoked to create app list widget. The Delegate calls the callback
33 virtual void ShowApps() = 0; 37 // when the widget is ready to show.
38 virtual void RequestAppListWidget(const SetWidgetCallback& callback) = 0;
34 39
35 // Invoked when the user clicks on a window entry in the launcher. 40 // Invoked when the user clicks on a window entry in the launcher.
36 virtual void LauncherItemClicked(const LauncherItem& item) = 0; 41 virtual void LauncherItemClicked(const LauncherItem& item) = 0;
37 42
38 // Invoked when a window is added. If the delegate wants the launcher to show 43 // 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 44 // an entry for |item->window| it should configure |item| appropriately and
40 // return true. 45 // return true.
41 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; 46 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0;
42 }; 47 };
43 48
44 } // namespace aura_shell 49 } // namespace aura_shell
45 50
46 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ 51 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698