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

Side by Side Diff: services/resource_coordinator/tracing/service.cc

Issue 2833873003: WIP: The tracing service prototype
Patch Set: sync Created 3 years, 7 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/resource_coordinator/tracing/service.h"
6
7 #include "base/bind.h"
8 #include "services/resource_coordinator/public/interfaces/tracing/tracing.mojom. h"
9 #include "services/service_manager/public/cpp/bind_source_info.h"
10
11 namespace resource_coordinator {
12 namespace tracing {
13
14 Service::Service() {
15 registry_.AddInterface<mojom::AgentSet>(base::BindRepeating(
16 &Service::BindAgentSetRequest, base::Unretained(this)));
17 registry_.AddInterface<mojom::Coordinator>(base::BindRepeating(
18 &Service::BindCoordinatorRequest, base::Unretained(this)));
19 }
20
21 Service::~Service() {}
22
23 void Service::OnBindInterface(
24 const service_manager::BindSourceInfo& source_info,
25 const std::string& interface_name,
26 mojo::ScopedMessagePipeHandle interface_pipe) {
27 registry_.BindInterface(source_info, interface_name,
28 std::move(interface_pipe));
29 }
30
31 void Service::BindAgentSetRequest(
32 const service_manager::BindSourceInfo& source_info,
33 mojom::AgentSetRequest request) {
34 coordinator_.agent_set()->BindAgentSetRequest(
35 service_manager::BindSourceInfo(), std::move(request));
36 }
37
38 void Service::BindCoordinatorRequest(
39 const service_manager::BindSourceInfo& source_info,
40 mojom::CoordinatorRequest request) {
41 coordinator_.BindCoordinatorRequest(std::move(request));
42 }
43
44 } // namespace tracing
45 } // namespace resource_coordinator
OLDNEW
« no previous file with comments | « services/resource_coordinator/tracing/service.h ('k') | services/service_manager/embedder/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698