| 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 "mash/wm/root_window_controller.h" | 5 #include "mash/wm/root_window_controller.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "components/mus/common/util.h" | 10 #include "components/mus/common/util.h" |
| 11 #include "components/mus/public/cpp/event_matcher.h" | 11 #include "components/mus/public/cpp/event_matcher.h" |
| 12 #include "components/mus/public/cpp/window.h" | 12 #include "components/mus/public/cpp/window.h" |
| 13 #include "components/mus/public/cpp/window_tree_connection.h" | 13 #include "components/mus/public/cpp/window_tree_connection.h" |
| 14 #include "components/mus/public/cpp/window_tree_host_factory.h" | 14 #include "components/mus/public/cpp/window_tree_host_factory.h" |
| 15 #include "mash/shell/public/interfaces/shell.mojom.h" | 15 #include "mash/session/public/interfaces/session.mojom.h" |
| 16 #include "mash/wm/background_layout.h" | 16 #include "mash/wm/background_layout.h" |
| 17 #include "mash/wm/fill_layout.h" | 17 #include "mash/wm/fill_layout.h" |
| 18 #include "mash/wm/screenlock_layout.h" | 18 #include "mash/wm/screenlock_layout.h" |
| 19 #include "mash/wm/shadow_controller.h" | 19 #include "mash/wm/shadow_controller.h" |
| 20 #include "mash/wm/shelf_layout.h" | 20 #include "mash/wm/shelf_layout.h" |
| 21 #include "mash/wm/window_layout.h" | 21 #include "mash/wm/window_layout.h" |
| 22 #include "mash/wm/window_manager.h" | 22 #include "mash/wm/window_manager.h" |
| 23 #include "mash/wm/window_manager_application.h" | 23 #include "mash/wm/window_manager_application.h" |
| 24 #include "mojo/shell/public/cpp/connector.h" | 24 #include "mojo/shell/public/cpp/connector.h" |
| 25 | 25 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 layout_manager_[login_app].reset(new ScreenlockLayout(login_app)); | 125 layout_manager_[login_app].reset(new ScreenlockLayout(login_app)); |
| 126 mus::Window* user_shelf = GetWindowForContainer(mojom::Container::USER_SHELF); | 126 mus::Window* user_shelf = GetWindowForContainer(mojom::Container::USER_SHELF); |
| 127 layout_manager_[user_shelf].reset(new ShelfLayout(user_shelf)); | 127 layout_manager_[user_shelf].reset(new ShelfLayout(user_shelf)); |
| 128 | 128 |
| 129 mus::Window* window = GetWindowForContainer(mojom::Container::USER_WINDOWS); | 129 mus::Window* window = GetWindowForContainer(mojom::Container::USER_WINDOWS); |
| 130 layout_manager_[window].reset(new WindowLayout(window)); | 130 layout_manager_[window].reset(new WindowLayout(window)); |
| 131 window_manager_client()->AddActivationParent(window); | 131 window_manager_client()->AddActivationParent(window); |
| 132 | 132 |
| 133 AddAccelerators(); | 133 AddAccelerators(); |
| 134 | 134 |
| 135 window_manager_->Initialize(this, app_->mash_shell()); | 135 window_manager_->Initialize(this, app_->session()); |
| 136 | 136 |
| 137 shadow_controller_.reset(new ShadowController(root->connection())); | 137 shadow_controller_.reset(new ShadowController(root->connection())); |
| 138 | 138 |
| 139 app_->OnRootWindowControllerDoneInit(this); | 139 app_->OnRootWindowControllerDoneInit(this); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void RootWindowController::OnConnectionLost( | 142 void RootWindowController::OnConnectionLost( |
| 143 mus::WindowTreeConnection* connection) { | 143 mus::WindowTreeConnection* connection) { |
| 144 shadow_controller_.reset(); | 144 shadow_controller_.reset(); |
| 145 delete this; | 145 delete this; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 mojom::Container::LOGIN_WINDOWS); | 195 mojom::Container::LOGIN_WINDOWS); |
| 196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, | 196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, |
| 197 mojom::Container::ROOT); | 197 mojom::Container::ROOT); |
| 198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); | 198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); |
| 199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); | 199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); |
| 200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); | 200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace wm | 203 } // namespace wm |
| 204 } // namespace mash | 204 } // namespace mash |
| OLD | NEW |