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

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

Issue 8890049: [Aura] Implement views-based applist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 9 years 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') | ui/aura_shell/test/test_shell_delegate.h » ('j') | 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 "base/callback.h"
10 #include "ui/aura_shell/aura_shell_export.h" 10 #include "ui/aura_shell/aura_shell_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Rect; 13 class Rect;
14 } 14 }
15 15
16 namespace views { 16 namespace views {
17 class Widget; 17 class Widget;
18 } 18 }
19 19
20 namespace aura_shell { 20 namespace aura_shell {
21 21
22 class AppListModel;
23 class AppListViewDelegate;
22 struct LauncherItem; 24 struct LauncherItem;
23 25
24 // Delegate of the Shell. 26 // Delegate of the Shell.
25 class AURA_SHELL_EXPORT ShellDelegate { 27 class AURA_SHELL_EXPORT ShellDelegate {
26 public: 28 public:
27 // Callback to pass back a widget used by RequestAppListWidget. 29 // Callback to pass back a widget used by RequestAppListWidget.
28 typedef base::Callback<void(views::Widget*)> SetWidgetCallback; 30 typedef base::Callback<void(views::Widget*)> SetWidgetCallback;
29 31
30 // The Shell owns the delegate. 32 // The Shell owns the delegate.
31 virtual ~ShellDelegate() {} 33 virtual ~ShellDelegate() {}
32 34
33 // Invoked when the user clicks on button in the launcher to create a new 35 // Invoked when the user clicks on button in the launcher to create a new
34 // window. 36 // window.
35 virtual void CreateNewWindow() = 0; 37 virtual void CreateNewWindow() = 0;
36 38
37 // Invoked to create a new status area. Can return NULL. 39 // Invoked to create a new status area. Can return NULL.
38 virtual views::Widget* CreateStatusArea() = 0; 40 virtual views::Widget* CreateStatusArea() = 0;
39 41
40 // Invoked to create app list widget. The Delegate calls the callback 42 // Invoked to create app list widget. The Delegate calls the callback
41 // when the widget is ready to show. 43 // when the widget is ready to show.
44 // Deprecated.
45 // TODO(xiyuan): Clean this up when switching to views app list.
42 virtual void RequestAppListWidget( 46 virtual void RequestAppListWidget(
43 const gfx::Rect& bounds, 47 const gfx::Rect& bounds,
44 const SetWidgetCallback& callback) = 0; 48 const SetWidgetCallback& callback) = 0;
45 49
50 // Invoked to ask the delegate to populate the |model|.
51 virtual void BuildAppListModel(AppListModel* model) = 0;
52
53 // Invoked to create an AppListViewDelegate. Shell takes the ownership of
54 // the created delegate.
55 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0;
56
46 // Invoked when the user clicks on a window entry in the launcher. 57 // Invoked when the user clicks on a window entry in the launcher.
47 virtual void LauncherItemClicked(const LauncherItem& item) = 0; 58 virtual void LauncherItemClicked(const LauncherItem& item) = 0;
48 59
49 // Invoked when a window is added. If the delegate wants the launcher to show 60 // Invoked when a window is added. If the delegate wants the launcher to show
50 // an entry for |item->window| it should configure |item| appropriately and 61 // an entry for |item->window| it should configure |item| appropriately and
51 // return true. 62 // return true.
52 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0; 63 virtual bool ConfigureLauncherItem(LauncherItem* item) = 0;
53 }; 64 };
54 } // namespace aura_shell 65 } // namespace aura_shell
55 66
56 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_ 67 #endif // UI_AURA_SHELL_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.cc ('k') | ui/aura_shell/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698