| 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 "mash/wm/window_manager_application.h" | 5 #include "mash/wm/window_manager_application.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "components/mus/public/cpp/event_matcher.h" | 10 #include "components/mus/public/cpp/event_matcher.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 uint32_t user_id) { | 109 uint32_t user_id) { |
| 110 connector_ = connector; | 110 connector_ = connector; |
| 111 tracing_.Initialize(connector, url); | 111 tracing_.Initialize(connector, url); |
| 112 | 112 |
| 113 mus::mojom::WindowManagerFactoryServicePtr wm_factory_service; | 113 mus::mojom::WindowManagerFactoryServicePtr wm_factory_service; |
| 114 connector_->ConnectToInterface("mojo:mus", &wm_factory_service); | 114 connector_->ConnectToInterface("mojo:mus", &wm_factory_service); |
| 115 wm_factory_service->SetWindowManagerFactory( | 115 wm_factory_service->SetWindowManagerFactory( |
| 116 window_manager_factory_binding_.CreateInterfacePtrAndBind()); | 116 window_manager_factory_binding_.CreateInterfacePtrAndBind()); |
| 117 | 117 |
| 118 user_window_controller_.reset(new UserWindowControllerImpl()); | 118 user_window_controller_.reset(new UserWindowControllerImpl()); |
| 119 | |
| 120 root_controllers_.insert( | |
| 121 RootWindowController::CreateUsingWindowTreeHost(this)); | |
| 122 } | 119 } |
| 123 | 120 |
| 124 bool WindowManagerApplication::AcceptConnection(mojo::Connection* connection) { | 121 bool WindowManagerApplication::AcceptConnection(mojo::Connection* connection) { |
| 125 connection->AddInterface<mash::wm::mojom::UserWindowController>(this); | 122 connection->AddInterface<mash::wm::mojom::UserWindowController>(this); |
| 126 connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this); | 123 connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this); |
| 127 if (connection->GetRemoteApplicationName() == "mojo:mash_shell") | 124 if (connection->GetRemoteApplicationName() == "mojo:mash_shell") |
| 128 connection->GetInterface(&mash_shell_); | 125 connection->GetInterface(&mash_shell_); |
| 129 return true; | 126 return true; |
| 130 } | 127 } |
| 131 | 128 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 162 | 159 |
| 163 void WindowManagerApplication::CreateWindowManager( | 160 void WindowManagerApplication::CreateWindowManager( |
| 164 mus::mojom::DisplayPtr display, | 161 mus::mojom::DisplayPtr display, |
| 165 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) { | 162 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) { |
| 166 root_controllers_.insert(RootWindowController::CreateFromDisplay( | 163 root_controllers_.insert(RootWindowController::CreateFromDisplay( |
| 167 this, std::move(display), std::move(client_request))); | 164 this, std::move(display), std::move(client_request))); |
| 168 } | 165 } |
| 169 | 166 |
| 170 } // namespace wm | 167 } // namespace wm |
| 171 } // namespace mash | 168 } // namespace mash |
| OLD | NEW |