OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "services/shell/service_manager.h" | 5 #include "services/shell/service_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 void Clone(mojom::ConnectorRequest request) override { | 287 void Clone(mojom::ConnectorRequest request) override { |
288 connectors_.AddBinding(this, std::move(request)); | 288 connectors_.AddBinding(this, std::move(request)); |
289 } | 289 } |
290 | 290 |
291 // mojom::PIDReceiver: | 291 // mojom::PIDReceiver: |
292 void SetPID(uint32_t pid) override { | 292 void SetPID(uint32_t pid) override { |
293 PIDAvailable(pid); | 293 PIDAvailable(pid); |
294 } | 294 } |
295 | 295 |
296 // InterfaceFactory<mojom::ServiceManager>: | 296 // InterfaceFactory<mojom::ServiceManager>: |
297 void Create(Connection* connection, | 297 void Create(const Identity& remote_identity, |
298 mojom::ServiceManagerRequest request) override { | 298 mojom::ServiceManagerRequest request) override { |
299 service_manager_bindings_.AddBinding(this, std::move(request)); | 299 service_manager_bindings_.AddBinding(this, std::move(request)); |
300 } | 300 } |
301 | 301 |
302 // mojom::ServiceManager implementation: | 302 // mojom::ServiceManager implementation: |
303 void AddListener(mojom::ServiceManagerListenerPtr listener) override { | 303 void AddListener(mojom::ServiceManagerListenerPtr listener) override { |
304 // TODO(beng): this should only track the instances matching this user, and | 304 // TODO(beng): this should only track the instances matching this user, and |
305 // root. | 305 // root. |
306 service_manager_->AddListener(std::move(listener)); | 306 service_manager_->AddListener(std::move(listener)); |
307 } | 307 } |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 // Now that the instance has a Service, we can connect to it. | 798 // Now that the instance has a Service, we can connect to it. |
799 bool connected = instance->ConnectToService(¶ms); | 799 bool connected = instance->ConnectToService(¶ms); |
800 DCHECK(connected); | 800 DCHECK(connected); |
801 } | 801 } |
802 | 802 |
803 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { | 803 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { |
804 return weak_ptr_factory_.GetWeakPtr(); | 804 return weak_ptr_factory_.GetWeakPtr(); |
805 } | 805 } |
806 | 806 |
807 } // namespace shell | 807 } // namespace shell |
OLD | NEW |