| 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/common/mojo_interface_factory.h" | 10 #include "ash/common/mojo_interface_factory.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity, | 181 bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity, |
| 182 shell::InterfaceRegistry* registry) { | 182 shell::InterfaceRegistry* registry) { |
| 183 // Register services used in both classic ash and mash. | 183 // Register services used in both classic ash and mash. |
| 184 mojo_interface_factory::RegisterInterfaces( | 184 mojo_interface_factory::RegisterInterfaces( |
| 185 registry, base::ThreadTaskRunnerHandle::Get()); | 185 registry, base::ThreadTaskRunnerHandle::Get()); |
| 186 | 186 |
| 187 registry->AddInterface<mojom::ShelfController>(this); | 187 registry->AddInterface<mojom::ShelfController>(this); |
| 188 registry->AddInterface<mojom::WallpaperController>(this); | 188 registry->AddInterface<mojom::WallpaperController>(this); |
| 189 registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this); | 189 registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this); |
| 190 if (remote_identity.name() == "mojo:mash_session") { | 190 if (remote_identity.name() == "service:mash_session") { |
| 191 connector()->ConnectToInterface(remote_identity, &session_); | 191 connector()->ConnectToInterface(remote_identity, &session_); |
| 192 session_->AddScreenlockStateListener( | 192 session_->AddScreenlockStateListener( |
| 193 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); | 193 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); |
| 194 } | 194 } |
| 195 return true; | 195 return true; |
| 196 } | 196 } |
| 197 | 197 |
| 198 void WindowManagerApplication::Create(const shell::Identity& remote_identity, | 198 void WindowManagerApplication::Create(const shell::Identity& remote_identity, |
| 199 mojom::ShelfControllerRequest request) { | 199 mojom::ShelfControllerRequest request) { |
| 200 mojom::ShelfController* shelf_controller = | 200 mojom::ShelfController* shelf_controller = |
| (...skipping 30 matching lines...) Expand all Loading... |
| 231 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, | 231 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, |
| 232 base::Unretained(this)))); | 232 base::Unretained(this)))); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { | 235 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { |
| 236 window_manager_->SetScreenLocked(locked); | 236 window_manager_->SetScreenLocked(locked); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace mus | 239 } // namespace mus |
| 240 } // namespace ash | 240 } // namespace ash |
| OLD | NEW |