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

Side by Side Diff: services/resource_coordinator/public/cpp/resource_coordinator_interface.h

Issue 2710823003: NOCOMMIT prototype: GRC service plumbing and process priority
Patch Set: Buildfixes Created 3 years, 9 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 #ifndef SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_RESOURCE_COORDINATOR_INTERFACE_ H_
6 #define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_RESOURCE_COORDINATOR_INTERFACE_ H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "services/resource_coordinator/public/interfaces/coordination_unit.mojo m.h"
13
14 namespace service_manager {
15 class Connector;
16 }
17
18 namespace resource_coordinator {
19
20 class ResourceCoordinatorInterface {
21 public:
22 ResourceCoordinatorInterface(service_manager::Connector* connector,
23 const mojom::IDType& type);
24 ~ResourceCoordinatorInterface();
25
26 const mojom::CoordinationUnitPtr& service() const { return service_; }
27
28 void SendEvent(const mojom::EventType& event_type);
29 void AddChild(const ResourceCoordinatorInterface& child);
30
31 private:
32 void ConnectToService(service_manager::Connector* connector,
33 const mojom::IDType& type,
34 const std::string& id);
35 void AddChildByID(
36 resource_coordinator::mojom::CoordinationUnitIDPtr child_id);
37
38 mojom::CoordinationUnitPtr service_;
39 base::WeakPtrFactory<ResourceCoordinatorInterface> weak_ptr_factory_;
40
41 DISALLOW_COPY_AND_ASSIGN(ResourceCoordinatorInterface);
42 };
43
44 } // namespace resource_coordinator
45
46 #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_RESOURCE_COORDINATOR_INTERFA CE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698