Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Side by Side Diff: services/shell/service_manager.cc

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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(&params); 799 bool connected = instance->ConnectToService(&params);
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
OLDNEW
« no previous file with comments | « services/shell/public/cpp/tests/interface_registry_unittest.cc ('k') | services/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698