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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 connector_->ConnectToInterface("mojo:mus", &wm_factory_service); | 115 connector_->ConnectToInterface("mojo:mus", &wm_factory_service); |
116 wm_factory_service->SetWindowManagerFactory( | 116 wm_factory_service->SetWindowManagerFactory( |
117 window_manager_factory_binding_.CreateInterfacePtrAndBind()); | 117 window_manager_factory_binding_.CreateInterfacePtrAndBind()); |
118 | 118 |
119 user_window_controller_.reset(new UserWindowControllerImpl()); | 119 user_window_controller_.reset(new UserWindowControllerImpl()); |
120 } | 120 } |
121 | 121 |
122 bool WindowManagerApplication::AcceptConnection(mojo::Connection* connection) { | 122 bool WindowManagerApplication::AcceptConnection(mojo::Connection* connection) { |
123 connection->AddInterface<mash::wm::mojom::UserWindowController>(this); | 123 connection->AddInterface<mash::wm::mojom::UserWindowController>(this); |
124 connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this); | 124 connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this); |
125 if (connection->GetRemoteIdentity().name() == "mojo:mash_shell") | 125 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") |
126 connection->GetInterface(&mash_shell_); | 126 connection->GetInterface(&session_); |
127 return true; | 127 return true; |
128 } | 128 } |
129 | 129 |
130 void WindowManagerApplication::ShellConnectionLost() { | 130 void WindowManagerApplication::ShellConnectionLost() { |
131 _exit(1); | 131 _exit(1); |
132 } | 132 } |
133 | 133 |
134 void WindowManagerApplication::Create( | 134 void WindowManagerApplication::Create( |
135 mojo::Connection* connection, | 135 mojo::Connection* connection, |
136 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> request) { | 136 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> request) { |
(...skipping 27 matching lines...) Expand all Loading... |
164 | 164 |
165 void WindowManagerApplication::CreateWindowManager( | 165 void WindowManagerApplication::CreateWindowManager( |
166 mus::mojom::DisplayPtr display, | 166 mus::mojom::DisplayPtr display, |
167 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) { | 167 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) { |
168 root_controllers_.insert(RootWindowController::CreateFromDisplay( | 168 root_controllers_.insert(RootWindowController::CreateFromDisplay( |
169 this, std::move(display), std::move(client_request))); | 169 this, std::move(display), std::move(client_request))); |
170 } | 170 } |
171 | 171 |
172 } // namespace wm | 172 } // namespace wm |
173 } // namespace mash | 173 } // namespace mash |
OLD | NEW |