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/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
10 #include "ash/mus/accelerators/accelerator_registrar_impl.h" | 10 #include "ash/mus/accelerators/accelerator_registrar_impl.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 window_tree_client->ConnectAsWindowManager(connector()); | 109 window_tree_client->ConnectAsWindowManager(connector()); |
110 | 110 |
111 InitWindowManager(window_tree_client); | 111 InitWindowManager(window_tree_client); |
112 } | 112 } |
113 | 113 |
114 bool WindowManagerApplication::OnConnect(shell::Connection* connection) { | 114 bool WindowManagerApplication::OnConnect(shell::Connection* connection) { |
115 connection->AddInterface<mojom::ShelfLayout>(this); | 115 connection->AddInterface<mojom::ShelfLayout>(this); |
116 connection->AddInterface<mojom::UserWindowController>(this); | 116 connection->AddInterface<mojom::UserWindowController>(this); |
117 connection->AddInterface<ui::mojom::AcceleratorRegistrar>(this); | 117 connection->AddInterface<ui::mojom::AcceleratorRegistrar>(this); |
118 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") { | 118 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") { |
119 connection->GetInterface(&session_); | 119 connector()->ConnectToInterface(connection->GetRemoteIdentity(), &session_); |
120 session_->AddScreenlockStateListener( | 120 session_->AddScreenlockStateListener( |
121 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); | 121 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); |
122 } | 122 } |
123 return true; | 123 return true; |
124 } | 124 } |
125 | 125 |
126 void WindowManagerApplication::Create( | 126 void WindowManagerApplication::Create( |
127 const shell::Identity& remote_identity, | 127 const shell::Identity& remote_identity, |
128 mojo::InterfaceRequest<mojom::ShelfLayout> request) { | 128 mojo::InterfaceRequest<mojom::ShelfLayout> request) { |
129 // TODO(msw): Handle multiple shelves (one per display). | 129 // TODO(msw): Handle multiple shelves (one per display). |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 RootWindowController* controller) { | 198 RootWindowController* controller) { |
199 // TODO(msw): this isn't right, ownership should belong in WindowManager | 199 // TODO(msw): this isn't right, ownership should belong in WindowManager |
200 // and/or RootWindowController. But this is temporary until we get rid of | 200 // and/or RootWindowController. But this is temporary until we get rid of |
201 // sysui. | 201 // sysui. |
202 shelf_layout_.reset(); | 202 shelf_layout_.reset(); |
203 user_window_controller_.reset(); | 203 user_window_controller_.reset(); |
204 } | 204 } |
205 | 205 |
206 } // namespace mus | 206 } // namespace mus |
207 } // namespace ash | 207 } // namespace ash |
OLD | NEW |