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

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

Issue 8558031: [Aura] Refactor and update app list window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_H_ 5 #ifndef UI_AURA_SHELL_SHELL_H_
6 #define UI_AURA_SHELL_SHELL_H_ 6 #define UI_AURA_SHELL_SHELL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 namespace gfx { 23 namespace gfx {
24 class Rect; 24 class Rect;
25 } 25 }
26 26
27 namespace aura_shell { 27 namespace aura_shell {
28 28
29 class Launcher; 29 class Launcher;
30 class ShellDelegate; 30 class ShellDelegate;
31 31
32 namespace internal { 32 namespace internal {
33 class AppList;
33 class DragDropController; 34 class DragDropController;
34 class ShelfLayoutController; 35 class ShelfLayoutController;
35 class WorkspaceController; 36 class WorkspaceController;
36 } 37 }
37 38
38 // Shell is a singleton object that presents the Shell API and implements the 39 // Shell is a singleton object that presents the Shell API and implements the
39 // Desktop's delegate interface. 40 // Desktop's delegate interface.
40 class AURA_SHELL_EXPORT Shell { 41 class AURA_SHELL_EXPORT Shell {
41 public: 42 public:
42 // Upon creation, the Shell sets itself as the Desktop's delegate, which takes 43 // Upon creation, the Shell sets itself as the Desktop's delegate, which takes
(...skipping 11 matching lines...) Expand all
54 aura::Window* GetContainer(int container_id); 55 aura::Window* GetContainer(int container_id);
55 const aura::Window* GetContainer(int container_id) const; 56 const aura::Window* GetContainer(int container_id) const;
56 57
57 // Adds or removes |filter| from the DesktopEventFilter. 58 // Adds or removes |filter| from the DesktopEventFilter.
58 void AddDesktopEventFilter(aura::EventFilter* filter); 59 void AddDesktopEventFilter(aura::EventFilter* filter);
59 void RemoveDesktopEventFilter(aura::EventFilter* filter); 60 void RemoveDesktopEventFilter(aura::EventFilter* filter);
60 61
61 // Toggles between overview mode and normal mode. 62 // Toggles between overview mode and normal mode.
62 void ToggleOverview(); 63 void ToggleOverview();
63 64
65 // Toggles app list.
66 void ToggleAppList();
67
64 ShellDelegate* delegate() { return delegate_.get(); } 68 ShellDelegate* delegate() { return delegate_.get(); }
65 Launcher* launcher() { return launcher_.get(); } 69 Launcher* launcher() { return launcher_.get(); }
66 70
67 private: 71 private:
68 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; 72 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
69 73
70 explicit Shell(ShellDelegate* delegate); 74 explicit Shell(ShellDelegate* delegate);
71 virtual ~Shell(); 75 virtual ~Shell();
72 76
73 void Init(); 77 void Init();
74 78
75 // Enables WorkspaceManager. 79 // Enables WorkspaceManager.
76 void EnableWorkspaceManager(); 80 void EnableWorkspaceManager();
77 81
78 static Shell* instance_; 82 static Shell* instance_;
79 83
80 std::vector<WindowAndBoundsPair> to_restore_; 84 std::vector<WindowAndBoundsPair> to_restore_;
81 85
82 base::WeakPtrFactory<Shell> method_factory_; 86 base::WeakPtrFactory<Shell> method_factory_;
83 87
84 scoped_ptr<ShellDelegate> delegate_; 88 scoped_ptr<ShellDelegate> delegate_;
85 89
86 scoped_ptr<Launcher> launcher_; 90 scoped_ptr<Launcher> launcher_;
87 91
92 scoped_ptr<internal::AppList> app_list_;
93
88 scoped_ptr<internal::DragDropController> drag_drop_controller_; 94 scoped_ptr<internal::DragDropController> drag_drop_controller_;
89 scoped_ptr<internal::WorkspaceController> workspace_controller_; 95 scoped_ptr<internal::WorkspaceController> workspace_controller_;
90 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_; 96 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_;
91 97
92 DISALLOW_COPY_AND_ASSIGN(Shell); 98 DISALLOW_COPY_AND_ASSIGN(Shell);
93 }; 99 };
94 100
95 } // namespace aura_shell 101 } // namespace aura_shell
96 102
97 #endif // UI_AURA_SHELL_SHELL_H_ 103 #endif // UI_AURA_SHELL_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698