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

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

Issue 8555025: aura: Draw drop shadows under browsers and menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes 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/shadow_controller_unittest.cc ('k') | ui/aura_shell/shell.cc » ('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_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 13 matching lines...) Expand all
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 DragDropController; 33 class DragDropController;
34 class ShadowController;
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
43 // ownership of the Shell. 44 // ownership of the Shell.
(...skipping 13 matching lines...) Expand all
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
64 ShellDelegate* delegate() { return delegate_.get(); } 65 ShellDelegate* delegate() { return delegate_.get(); }
65 Launcher* launcher() { return launcher_.get(); } 66 Launcher* launcher() { return launcher_.get(); }
66 67
68 // Made available for tests.
69 internal::ShadowController* shadow_controller() {
70 return shadow_controller_.get();
71 }
72
67 private: 73 private:
68 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; 74 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
69 75
70 explicit Shell(ShellDelegate* delegate); 76 explicit Shell(ShellDelegate* delegate);
71 virtual ~Shell(); 77 virtual ~Shell();
72 78
73 void Init(); 79 void Init();
74 80
75 // Enables WorkspaceManager. 81 // Enables WorkspaceManager.
76 void EnableWorkspaceManager(); 82 void EnableWorkspaceManager();
77 83
78 static Shell* instance_; 84 static Shell* instance_;
79 85
80 std::vector<WindowAndBoundsPair> to_restore_; 86 std::vector<WindowAndBoundsPair> to_restore_;
81 87
82 base::WeakPtrFactory<Shell> method_factory_; 88 base::WeakPtrFactory<Shell> method_factory_;
83 89
84 scoped_ptr<ShellDelegate> delegate_; 90 scoped_ptr<ShellDelegate> delegate_;
85 91
86 scoped_ptr<Launcher> launcher_; 92 scoped_ptr<Launcher> launcher_;
87 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_;
97 scoped_ptr<internal::ShadowController> shadow_controller_;
91 98
92 DISALLOW_COPY_AND_ASSIGN(Shell); 99 DISALLOW_COPY_AND_ASSIGN(Shell);
93 }; 100 };
94 101
95 } // namespace aura_shell 102 } // namespace aura_shell
96 103
97 #endif // UI_AURA_SHELL_SHELL_H_ 104 #endif // UI_AURA_SHELL_SHELL_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/shadow_controller_unittest.cc ('k') | ui/aura_shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698