OLD | NEW |
(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_COORDINATION_UNIT_COORDINATION_UNIT_PROVID
ER_IMPL_H_ |
| 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_PROVID
ER_IMPL_H_ |
| 7 |
| 8 #include "mojo/public/cpp/bindings/interface_request.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 #include "services/resource_coordinator/public/interfaces/coordination_unit_prov
ider.mojom.h" |
| 11 #include "services/service_manager/public/cpp/bind_source_info.h" |
| 12 |
| 13 namespace service_manager { |
| 14 |
| 15 class ServiceContextRefFactory; |
| 16 class ServiceContextRef; |
| 17 |
| 18 } // service_manager |
| 19 |
| 20 namespace resource_coordinator { |
| 21 |
| 22 class CoordinationUnitProviderImpl : public mojom::CoordinationUnitProvider { |
| 23 public: |
| 24 CoordinationUnitProviderImpl( |
| 25 service_manager::ServiceContextRefFactory* service_ref_factory); |
| 26 ~CoordinationUnitProviderImpl() override; |
| 27 |
| 28 static void Create( |
| 29 service_manager::ServiceContextRefFactory* service_ref_factory, |
| 30 const service_manager::BindSourceInfo& source_info, |
| 31 resource_coordinator::mojom::CoordinationUnitProviderRequest request); |
| 32 |
| 33 // Overridden from mojom::CoordinationUnitProvider: |
| 34 void CreateCoordinationUnit( |
| 35 resource_coordinator::mojom::CoordinationUnitRequest request, |
| 36 const CoordinationUnitID& id) override; |
| 37 |
| 38 private: |
| 39 service_manager::ServiceContextRefFactory* service_ref_factory_; |
| 40 std::unique_ptr<service_manager::ServiceContextRef> service_ref_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitProviderImpl); |
| 43 }; |
| 44 |
| 45 } // namespace resource_coordinator |
| 46 |
| 47 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_PRO
VIDER_IMPL_H_ |
OLD | NEW |