OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/root_window_controller.h" | 5 #include "ash/mus/root_window_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <sstream> | 10 #include <sstream> |
11 | 11 |
12 #include "ash/common/shell_window_ids.h" | 12 #include "ash/common/shell_window_ids.h" |
13 #include "ash/common/wm/always_on_top_controller.h" | 13 #include "ash/common/wm/always_on_top_controller.h" |
14 #include "ash/common/wm/dock/docked_window_layout_manager.h" | 14 #include "ash/common/wm/dock/docked_window_layout_manager.h" |
15 #include "ash/common/wm/panels/panel_layout_manager.h" | 15 #include "ash/common/wm/panels/panel_layout_manager.h" |
16 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 16 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
17 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h" | 17 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h" |
18 #include "ash/mus/background_layout.h" | 18 #include "ash/mus/background_layout.h" |
19 #include "ash/mus/bridge/wm_globals_mus.h" | |
20 #include "ash/mus/bridge/wm_root_window_controller_mus.h" | 19 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
21 #include "ash/mus/bridge/wm_shelf_mus.h" | 20 #include "ash/mus/bridge/wm_shelf_mus.h" |
| 21 #include "ash/mus/bridge/wm_shell_mus.h" |
22 #include "ash/mus/bridge/wm_window_mus.h" | 22 #include "ash/mus/bridge/wm_window_mus.h" |
23 #include "ash/mus/container_ids.h" | 23 #include "ash/mus/container_ids.h" |
24 #include "ash/mus/fill_layout.h" | 24 #include "ash/mus/fill_layout.h" |
25 #include "ash/mus/screenlock_layout.h" | 25 #include "ash/mus/screenlock_layout.h" |
26 #include "ash/mus/shadow_controller.h" | 26 #include "ash/mus/shadow_controller.h" |
27 #include "ash/mus/shelf_layout_manager.h" | 27 #include "ash/mus/shelf_layout_manager.h" |
28 #include "ash/mus/status_layout_manager.h" | 28 #include "ash/mus/status_layout_manager.h" |
29 #include "ash/mus/window_manager.h" | 29 #include "ash/mus/window_manager.h" |
30 #include "ash/mus/window_manager_application.h" | 30 #include "ash/mus/window_manager_application.h" |
31 #include "base/bind.h" | 31 #include "base/bind.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 void RootWindowController::OnEmbed(::mus::Window* root) { | 166 void RootWindowController::OnEmbed(::mus::Window* root) { |
167 root_ = root; | 167 root_ = root; |
168 root_->set_local_id(ContainerToLocalId(Container::ROOT)); | 168 root_->set_local_id(ContainerToLocalId(Container::ROOT)); |
169 root_->AddObserver(this); | 169 root_->AddObserver(this); |
170 layout_managers_[root_].reset(new FillLayout(root_)); | 170 layout_managers_[root_].reset(new FillLayout(root_)); |
171 | 171 |
172 app_->OnRootWindowControllerGotRoot(this); | 172 app_->OnRootWindowControllerGotRoot(this); |
173 | 173 |
174 wm_root_window_controller_.reset( | 174 wm_root_window_controller_.reset( |
175 new WmRootWindowControllerMus(app_->globals(), this)); | 175 new WmRootWindowControllerMus(app_->shell(), this)); |
176 | 176 |
177 CreateContainers(); | 177 CreateContainers(); |
178 | 178 |
179 for (size_t i = 0; i < kNumActivationContainers; ++i) { | 179 for (size_t i = 0; i < kNumActivationContainers; ++i) { |
180 window_manager_client()->AddActivationParent( | 180 window_manager_client()->AddActivationParent( |
181 GetWindowForContainer(kActivationContainers[i])); | 181 GetWindowForContainer(kActivationContainers[i])); |
182 } | 182 } |
183 | 183 |
184 wm::WmWindow* always_on_top_container = | 184 WmWindow* always_on_top_container = |
185 WmWindowMus::Get(root)->GetChildByShellWindowId( | 185 WmWindowMus::Get(root)->GetChildByShellWindowId( |
186 kShellWindowId_AlwaysOnTopContainer); | 186 kShellWindowId_AlwaysOnTopContainer); |
187 always_on_top_controller_.reset( | 187 always_on_top_controller_.reset( |
188 new AlwaysOnTopController(always_on_top_container)); | 188 new AlwaysOnTopController(always_on_top_container)); |
189 | 189 |
190 AddAccelerators(); | 190 AddAccelerators(); |
191 | 191 |
192 window_manager_->Initialize(this, app_->session()); | 192 window_manager_->Initialize(this, app_->session()); |
193 | 193 |
194 shadow_controller_.reset(new ShadowController(root->window_tree())); | 194 shadow_controller_.reset(new ShadowController(root->window_tree())); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 ::mus::Window* user_private_always_on_top = | 343 ::mus::Window* user_private_always_on_top = |
344 GetWindowForContainer(Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS); | 344 GetWindowForContainer(Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS); |
345 WmWindowMus* user_private_always_on_top_wm = | 345 WmWindowMus* user_private_always_on_top_wm = |
346 WmWindowMus::Get(user_private_always_on_top); | 346 WmWindowMus::Get(user_private_always_on_top); |
347 user_private_always_on_top_wm->SetChildrenUseExtendedHitRegion(); | 347 user_private_always_on_top_wm->SetChildrenUseExtendedHitRegion(); |
348 user_private_always_on_top_wm->SetSnapsChildrenToPhysicalPixelBoundary(); | 348 user_private_always_on_top_wm->SetSnapsChildrenToPhysicalPixelBoundary(); |
349 } | 349 } |
350 | 350 |
351 } // namespace mus | 351 } // namespace mus |
352 } // namespace ash | 352 } // namespace ash |
OLD | NEW |