| 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 #include "ui/aura_shell/shell.h" | 5 #include "ui/aura_shell/shell.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "ui/aura/aura_switches.h" | 9 #include "ui/aura/aura_switches.h" |
| 10 #include "ui/aura/desktop.h" | 10 #include "ui/aura/desktop.h" |
| 11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
| 12 #include "ui/aura/window_types.h" | 12 #include "ui/aura/window_types.h" |
| 13 #include "ui/aura_shell/default_container_event_filter.h" | 13 #include "ui/aura_shell/default_container_event_filter.h" |
| 14 #include "ui/aura_shell/default_container_layout_manager.h" | 14 #include "ui/aura_shell/default_container_layout_manager.h" |
| 15 #include "ui/aura_shell/desktop_event_filter.h" | 15 #include "ui/aura_shell/desktop_event_filter.h" |
| 16 #include "ui/aura_shell/desktop_layout_manager.h" | 16 #include "ui/aura_shell/desktop_layout_manager.h" |
| 17 #include "ui/aura_shell/drag_drop_controller.h" |
| 17 #include "ui/aura_shell/launcher/launcher.h" | 18 #include "ui/aura_shell/launcher/launcher.h" |
| 18 #include "ui/aura_shell/shelf_layout_controller.h" | 19 #include "ui/aura_shell/shelf_layout_controller.h" |
| 19 #include "ui/aura_shell/shell_delegate.h" | 20 #include "ui/aura_shell/shell_delegate.h" |
| 20 #include "ui/aura_shell/shell_factory.h" | 21 #include "ui/aura_shell/shell_factory.h" |
| 21 #include "ui/aura_shell/shell_window_ids.h" | 22 #include "ui/aura_shell/shell_window_ids.h" |
| 22 #include "ui/aura_shell/stacking_controller.h" | 23 #include "ui/aura_shell/stacking_controller.h" |
| 23 #include "ui/aura_shell/toplevel_layout_manager.h" | 24 #include "ui/aura_shell/toplevel_layout_manager.h" |
| 24 #include "ui/aura_shell/toplevel_window_event_filter.h" | 25 #include "ui/aura_shell/toplevel_window_event_filter.h" |
| 25 #include "ui/aura_shell/workspace_controller.h" | 26 #include "ui/aura_shell/workspace_controller.h" |
| 26 #include "ui/gfx/compositor/layer.h" | 27 #include "ui/gfx/compositor/layer.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 82 |
| 82 //////////////////////////////////////////////////////////////////////////////// | 83 //////////////////////////////////////////////////////////////////////////////// |
| 83 // Shell, public: | 84 // Shell, public: |
| 84 | 85 |
| 85 Shell::Shell() | 86 Shell::Shell() |
| 86 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { | 87 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { |
| 87 aura::Desktop::GetInstance()->SetEventFilter( | 88 aura::Desktop::GetInstance()->SetEventFilter( |
| 88 new internal::DesktopEventFilter); | 89 new internal::DesktopEventFilter); |
| 89 aura::Desktop::GetInstance()->SetStackingClient( | 90 aura::Desktop::GetInstance()->SetStackingClient( |
| 90 new internal::StackingController); | 91 new internal::StackingController); |
| 92 aura::Desktop::GetInstance()->SetDragDropClient( |
| 93 new internal::DragDropController); |
| 91 } | 94 } |
| 92 | 95 |
| 93 Shell::~Shell() { | 96 Shell::~Shell() { |
| 94 // Make sure we delete WorkspaceController before launcher is | 97 // Make sure we delete WorkspaceController before launcher is |
| 95 // deleted as it has a reference to launcher model. | 98 // deleted as it has a reference to launcher model. |
| 96 workspace_controller_.reset(); | 99 workspace_controller_.reset(); |
| 97 } | 100 } |
| 98 | 101 |
| 99 // static | 102 // static |
| 100 Shell* Shell::GetInstance() { | 103 Shell* Shell::GetInstance() { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 new internal::WorkspaceController(default_container)); | 182 new internal::WorkspaceController(default_container)); |
| 180 workspace_controller_->SetLauncherModel(launcher_->model()); | 183 workspace_controller_->SetLauncherModel(launcher_->model()); |
| 181 default_container->SetEventFilter( | 184 default_container->SetEventFilter( |
| 182 new internal::DefaultContainerEventFilter(default_container)); | 185 new internal::DefaultContainerEventFilter(default_container)); |
| 183 default_container->SetLayoutManager( | 186 default_container->SetLayoutManager( |
| 184 new internal::DefaultContainerLayoutManager( | 187 new internal::DefaultContainerLayoutManager( |
| 185 workspace_controller_->workspace_manager())); | 188 workspace_controller_->workspace_manager())); |
| 186 } | 189 } |
| 187 | 190 |
| 188 } // namespace aura_shell | 191 } // namespace aura_shell |
| OLD | NEW |