| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/login/login.h" | 5 #include "mash/login/login.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/public/interfaces/container.mojom.h" | 10 #include "ash/public/interfaces/container.mojom.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void OnStart(const shell::Identity& identity) override { | 151 void OnStart(const shell::Identity& identity) override { |
| 152 identity_ = identity; | 152 identity_ = identity; |
| 153 tracing_.Initialize(connector(), identity.name()); | 153 tracing_.Initialize(connector(), identity.name()); |
| 154 | 154 |
| 155 aura_init_.reset( | 155 aura_init_.reset( |
| 156 new views::AuraInit(connector(), "views_mus_resources.pak")); | 156 new views::AuraInit(connector(), "views_mus_resources.pak")); |
| 157 | 157 |
| 158 connector()->ConnectToInterface("mojo:ui", &user_access_manager_); | 158 connector()->ConnectToInterface("mojo:ui", &user_access_manager_); |
| 159 user_access_manager_->SetActiveUser(identity.user_id()); | 159 user_access_manager_->SetActiveUser(identity.user_id()); |
| 160 } | 160 } |
| 161 bool OnConnect(shell::Connection* connection) override { | 161 bool OnConnect(const shell::Identity& remote_identity, |
| 162 connection->AddInterface<mojom::Login>(this); | 162 shell::InterfaceRegistry* registry) override { |
| 163 registry->AddInterface<mojom::Login>(this); |
| 163 return true; | 164 return true; |
| 164 } | 165 } |
| 165 | 166 |
| 166 // shell::InterfaceFactory<mojom::Login>: | 167 // shell::InterfaceFactory<mojom::Login>: |
| 167 void Create(const shell::Identity& remote_identity, | 168 void Create(const shell::Identity& remote_identity, |
| 168 mojom::LoginRequest request) override { | 169 mojom::LoginRequest request) override { |
| 169 bindings_.AddBinding(this, std::move(request)); | 170 bindings_.AddBinding(this, std::move(request)); |
| 170 } | 171 } |
| 171 | 172 |
| 172 // mojom::Login: | 173 // mojom::Login: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 201 } | 202 } |
| 202 | 203 |
| 203 } // namespace | 204 } // namespace |
| 204 | 205 |
| 205 shell::Service* CreateLogin() { | 206 shell::Service* CreateLogin() { |
| 206 return new Login; | 207 return new Login; |
| 207 } | 208 } |
| 208 | 209 |
| 209 } // namespace login | 210 } // namespace login |
| 210 } // namespace main | 211 } // namespace main |
| OLD | NEW |