| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/window_manager_application.h" | 5 #include "ash/mus/window_manager_application.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/mus/accelerator_registrar_impl.h" | 9 #include "ash/mus/accelerator_registrar_impl.h" |
| 10 #include "ash/mus/bridge/wm_globals_mus.h" | |
| 11 #include "ash/mus/bridge/wm_lookup_mus.h" | 10 #include "ash/mus/bridge/wm_lookup_mus.h" |
| 11 #include "ash/mus/bridge/wm_shell_mus.h" |
| 12 #include "ash/mus/root_window_controller.h" | 12 #include "ash/mus/root_window_controller.h" |
| 13 #include "ash/mus/root_windows_observer.h" | 13 #include "ash/mus/root_windows_observer.h" |
| 14 #include "ash/mus/shelf_layout_impl.h" | 14 #include "ash/mus/shelf_layout_impl.h" |
| 15 #include "ash/mus/user_window_controller_impl.h" | 15 #include "ash/mus/user_window_controller_impl.h" |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "components/mus/common/event_matcher_util.h" | 18 #include "components/mus/common/event_matcher_util.h" |
| 19 #include "components/mus/public/cpp/window.h" | 19 #include "components/mus/public/cpp/window.h" |
| 20 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" | 20 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" |
| 21 #include "services/shell/public/cpp/connection.h" | 21 #include "services/shell/public/cpp/connection.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 49 std::set<RootWindowController*> root_controllers; | 49 std::set<RootWindowController*> root_controllers; |
| 50 for (RootWindowController* controller : root_controllers_) { | 50 for (RootWindowController* controller : root_controllers_) { |
| 51 if (controller->root()) | 51 if (controller->root()) |
| 52 root_controllers.insert(controller); | 52 root_controllers.insert(controller); |
| 53 } | 53 } |
| 54 return root_controllers; | 54 return root_controllers; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WindowManagerApplication::OnRootWindowControllerGotRoot( | 57 void WindowManagerApplication::OnRootWindowControllerGotRoot( |
| 58 RootWindowController* root_controller) { | 58 RootWindowController* root_controller) { |
| 59 if (globals_) | 59 if (shell_) |
| 60 return; // |root_controller| is the > 1 root, nothing to do. | 60 return; // |root_controller| is the > 1 root, nothing to do. |
| 61 | 61 |
| 62 if (connector_) | 62 if (connector_) |
| 63 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak")); | 63 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak")); |
| 64 | 64 |
| 65 globals_.reset(new WmGlobalsMus(root_controller->root()->window_tree())); | 65 shell_.reset(new WmShellMus(root_controller->root()->window_tree())); |
| 66 lookup_.reset(new WmLookupMus); | 66 lookup_.reset(new WmLookupMus); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void WindowManagerApplication::OnRootWindowControllerDoneInit( | 69 void WindowManagerApplication::OnRootWindowControllerDoneInit( |
| 70 RootWindowController* root_controller) { | 70 RootWindowController* root_controller) { |
| 71 if (!screen_) { | 71 if (!screen_) { |
| 72 std::unique_ptr<views::ScreenMus> screen(new views::ScreenMus(nullptr)); | 72 std::unique_ptr<views::ScreenMus> screen(new views::ScreenMus(nullptr)); |
| 73 screen->Init(connector_); | 73 screen->Init(connector_); |
| 74 screen_ = std::move(screen); | 74 screen_ = std::move(screen); |
| 75 } | 75 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 void WindowManagerApplication::CreateWindowManager( | 199 void WindowManagerApplication::CreateWindowManager( |
| 200 ::mus::mojom::DisplayPtr display, | 200 ::mus::mojom::DisplayPtr display, |
| 201 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) { | 201 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) { |
| 202 AddRootWindowController(RootWindowController::CreateFromDisplay( | 202 AddRootWindowController(RootWindowController::CreateFromDisplay( |
| 203 this, std::move(display), std::move(client_request))); | 203 this, std::move(display), std::move(client_request))); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace mus | 206 } // namespace mus |
| 207 } // namespace ash | 207 } // namespace ash |
| OLD | NEW |