OLD | NEW |
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> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/task.h" | 14 #include "base/task.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "ui/aura_shell/aura_shell_export.h" | 17 #include "ui/aura_shell/aura_shell_export.h" |
18 | 18 |
19 namespace aura { | 19 namespace aura { |
20 class EventFilter; | 20 class EventFilter; |
| 21 class RootWindow; |
21 class Window; | 22 class Window; |
22 } | 23 } |
23 namespace gfx { | 24 namespace gfx { |
24 class Rect; | 25 class Rect; |
25 } | 26 } |
26 | 27 |
27 namespace aura_shell { | 28 namespace aura_shell { |
28 | 29 |
29 class Launcher; | 30 class Launcher; |
30 class ShellAcceleratorController; | 31 class ShellAcceleratorController; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 75 |
75 ShellAcceleratorController* accelerator_controller() { | 76 ShellAcceleratorController* accelerator_controller() { |
76 return accelerator_controller_.get(); | 77 return accelerator_controller_.get(); |
77 } | 78 } |
78 | 79 |
79 ShellTooltipManager* tooltip_manager() { | 80 ShellTooltipManager* tooltip_manager() { |
80 return tooltip_manager_.get(); | 81 return tooltip_manager_.get(); |
81 } | 82 } |
82 | 83 |
83 ShellDelegate* delegate() { return delegate_.get(); } | 84 ShellDelegate* delegate() { return delegate_.get(); } |
| 85 |
| 86 // May return NULL if we're not using a launcher (e.g. laptop-mode). |
84 Launcher* launcher() { return launcher_.get(); } | 87 Launcher* launcher() { return launcher_.get(); } |
85 | 88 |
86 // Made available for tests. | 89 // Made available for tests. |
87 internal::ShadowController* shadow_controller() { | 90 internal::ShadowController* shadow_controller() { |
88 return shadow_controller_.get(); | 91 return shadow_controller_.get(); |
89 } | 92 } |
90 | 93 |
91 private: | 94 private: |
92 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; | 95 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
93 | 96 |
94 explicit Shell(ShellDelegate* delegate); | 97 explicit Shell(ShellDelegate* delegate); |
95 virtual ~Shell(); | 98 virtual ~Shell(); |
96 | 99 |
97 void Init(); | 100 void Init(); |
| 101 void InitLayoutManagers(aura::RootWindow* root_window); |
98 | 102 |
99 // Enables WorkspaceManager. | 103 // Enables WorkspaceManager. |
100 void EnableWorkspaceManager(); | 104 void EnableWorkspaceManager(); |
101 | 105 |
102 static Shell* instance_; | 106 static Shell* instance_; |
103 | 107 |
104 std::vector<WindowAndBoundsPair> to_restore_; | 108 std::vector<WindowAndBoundsPair> to_restore_; |
105 | 109 |
106 base::WeakPtrFactory<Shell> method_factory_; | 110 base::WeakPtrFactory<Shell> method_factory_; |
107 | 111 |
(...skipping 14 matching lines...) Expand all Loading... |
122 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; | 126 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; |
123 | 127 |
124 scoped_ptr<ShellTooltipManager> tooltip_manager_; | 128 scoped_ptr<ShellTooltipManager> tooltip_manager_; |
125 | 129 |
126 DISALLOW_COPY_AND_ASSIGN(Shell); | 130 DISALLOW_COPY_AND_ASSIGN(Shell); |
127 }; | 131 }; |
128 | 132 |
129 } // namespace aura_shell | 133 } // namespace aura_shell |
130 | 134 |
131 #endif // UI_AURA_SHELL_SHELL_H_ | 135 #endif // UI_AURA_SHELL_SHELL_H_ |
OLD | NEW |