Chromium Code Reviews| 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/connection.h" | |
|
Primiano Tucci (use gerrit)
2017/04/06 18:09:46
is this include used?
oystein (OOO til 10th of July)
2017/04/10 20:02:59
Leftover; removed.
| |
| 12 #include "services/service_manager/public/cpp/service_context_ref.h" | |
|
Primiano Tucci (use gerrit)
2017/04/06 18:09:46
ServiceContextRef could be ust forward declared, r
oystein (OOO til 10th of July)
2017/04/10 20:02:59
Done.
| |
| 13 | |
| 14 namespace resource_coordinator { | |
| 15 | |
| 16 class CoordinationUnitProviderImpl : public mojom::CoordinationUnitProvider { | |
| 17 public: | |
| 18 CoordinationUnitProviderImpl( | |
| 19 service_manager::ServiceContextRefFactory* service_ref_factory); | |
| 20 ~CoordinationUnitProviderImpl() override; | |
| 21 | |
| 22 static void Create( | |
| 23 service_manager::ServiceContextRefFactory* service_ref_factory, | |
| 24 resource_coordinator::mojom::CoordinationUnitProviderRequest request) { | |
|
Primiano Tucci (use gerrit)
2017/04/06 18:09:46
why this is inlined? inlining should be only for t
oystein (OOO til 10th of July)
2017/04/10 20:02:59
Copy pasted from elsewhere; no good reason that I
| |
| 25 mojo::MakeStrongBinding( | |
| 26 base::MakeUnique<CoordinationUnitProviderImpl>(service_ref_factory), | |
| 27 std::move(request)); | |
| 28 } | |
| 29 | |
| 30 // Overridden from mojom::CoordinationUnitProvider: | |
| 31 void CreateCoordinationUnit( | |
| 32 resource_coordinator::mojom::CoordinationUnitRequest request, | |
| 33 const CoordinationUnitID& id) override; | |
| 34 | |
| 35 private: | |
| 36 service_manager::ServiceContextRefFactory* service_ref_factory_; | |
| 37 std::unique_ptr<service_manager::ServiceContextRef> service_ref_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitProviderImpl); | |
| 40 }; | |
| 41 | |
| 42 } // namespace resource_coordinator | |
| 43 | |
| 44 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_PRO VIDER_IMPL_H_ | |
| OLD | NEW |