| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/wm/window_manager_impl.h" | 5 #include "athena/wm/window_manager_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "athena/common/container_priorities.h" | 9 #include "athena/common/container_priorities.h" |
| 10 #include "athena/screen/public/screen_manager.h" | 10 #include "athena/screen/public/screen_manager.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 WindowManagerImpl::WindowManagerImpl() { | 134 WindowManagerImpl::WindowManagerImpl() { |
| 135 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT); | 135 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT); |
| 136 params.can_activate_children = true; | 136 params.can_activate_children = true; |
| 137 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params)); | 137 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params)); |
| 138 container_->SetLayoutManager(new AthenaContainerLayoutManager); | 138 container_->SetLayoutManager(new AthenaContainerLayoutManager); |
| 139 container_->AddObserver(this); | 139 container_->AddObserver(this); |
| 140 window_list_provider_.reset(new WindowListProviderImpl(container_.get())); | 140 window_list_provider_.reset(new WindowListProviderImpl(container_.get())); |
| 141 bezel_controller_.reset(new BezelController(container_.get())); | 141 bezel_controller_.reset(new BezelController(container_.get())); |
| 142 split_view_controller_.reset( | 142 split_view_controller_.reset( |
| 143 new SplitViewController(container_.get(), window_list_provider_.get())); | 143 new SplitViewController(container_.get(), window_list_provider_.get())); |
| 144 AddObserver(split_view_controller_.get()); |
| 144 bezel_controller_->set_left_right_delegate(split_view_controller_.get()); | 145 bezel_controller_->set_left_right_delegate(split_view_controller_.get()); |
| 145 container_->AddPreTargetHandler(bezel_controller_.get()); | 146 container_->AddPreTargetHandler(bezel_controller_.get()); |
| 146 title_drag_controller_.reset(new TitleDragController(container_.get(), this)); | 147 title_drag_controller_.reset(new TitleDragController(container_.get(), this)); |
| 147 wm_state_.reset(new wm::WMState()); | 148 wm_state_.reset(new wm::WMState()); |
| 148 aura::client::ActivationClient* activation_client = | 149 aura::client::ActivationClient* activation_client = |
| 149 aura::client::GetActivationClient(container_->GetRootWindow()); | 150 aura::client::GetActivationClient(container_->GetRootWindow()); |
| 150 shadow_controller_.reset(new wm::ShadowController(activation_client)); | 151 shadow_controller_.reset(new wm::ShadowController(activation_client)); |
| 151 instance = this; | 152 instance = this; |
| 152 InstallAccelerators(); | 153 InstallAccelerators(); |
| 153 } | 154 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 DCHECK(!instance); | 400 DCHECK(!instance); |
| 400 } | 401 } |
| 401 | 402 |
| 402 // static | 403 // static |
| 403 WindowManager* WindowManager::GetInstance() { | 404 WindowManager* WindowManager::GetInstance() { |
| 404 DCHECK(instance); | 405 DCHECK(instance); |
| 405 return instance; | 406 return instance; |
| 406 } | 407 } |
| 407 | 408 |
| 408 } // namespace athena | 409 } // namespace athena |
| OLD | NEW |