summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 52e25d1..651068f 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -270,11 +270,7 @@ internal::WorkspaceController* Shell::TestApi::workspace_controller() {
// Shell, public:
Shell::Shell(ShellDelegate* delegate)
- : root_filter_(new internal::RootWindowEventFilter),
-#if !defined(OS_MACOSX)
- nested_dispatcher_controller_(new NestedDispatcherController),
- accelerator_controller_(new AcceleratorController),
-#endif
+ : root_window_(new aura::RootWindow),
delegate_(delegate),
audio_controller_(NULL),
brightness_controller_(NULL),
@@ -283,8 +279,6 @@ Shell::Shell(ShellDelegate* delegate)
desktop_background_mode_(BACKGROUND_IMAGE),
root_window_layout_(NULL),
status_widget_(NULL) {
- // Pass ownership of the filter to the root window.
- GetRootWindow()->SetEventFilter(root_filter_);
}
Shell::~Shell() {
@@ -320,7 +314,10 @@ Shell::~Shell() {
// These need a valid Shell instance to clean up properly, so explicitly
// delete them before invalidating the instance.
+ // Alphabetical.
+ activation_controller_.reset();
drag_drop_controller_.reset();
+ shadow_controller_.reset();
window_cycle_controller_.reset();
// Launcher widget has a InputMethodBridge that references to
@@ -356,10 +353,18 @@ void Shell::DeleteInstance() {
// static
aura::RootWindow* Shell::GetRootWindow() {
- return aura::RootWindow::GetInstance();
+ return GetInstance()->root_window_.get();
}
void Shell::Init() {
+ root_filter_ = new internal::RootWindowEventFilter;
+#if !defined(OS_MACOSX)
+ nested_dispatcher_controller_.reset(new NestedDispatcherController);
+ accelerator_controller_.reset(new AcceleratorController);
+#endif
+ // Pass ownership of the filter to the root window.
+ GetRootWindow()->SetEventFilter(root_filter_);
+
DCHECK(!GetRootWindowEventFilterCount());
// PartialScreenshotEventFilter must be the first one to capture key