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_SERVICE_CALLBACKS_IMPL_H_ |
| 6 #define SERVICES_RESOURCE_COORDINATOR_SERVICE_CALLBACKS_IMPL_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "components/ukm/public/interfaces/ukm_interface.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/interface_request.h" |
| 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 13 #include "services/resource_coordinator/public/interfaces/service_callbacks.mojo
m.h" |
| 14 #include "services/service_manager/public/cpp/bind_source_info.h" |
| 15 |
| 16 namespace service_manager { |
| 17 class ServiceContextRefFactory; |
| 18 class ServiceContextRef; |
| 19 } // namespace service_manager |
| 20 |
| 21 namespace resource_coordinator { |
| 22 |
| 23 class ResourceCoordinatorService; |
| 24 |
| 25 class ServiceCallbacksImpl : public mojom::ServiceCallbacks { |
| 26 public: |
| 27 ServiceCallbacksImpl( |
| 28 service_manager::ServiceContextRefFactory* service_ref_factory, |
| 29 ResourceCoordinatorService* resource_coordinator_service); |
| 30 ~ServiceCallbacksImpl() override; |
| 31 |
| 32 static void Create( |
| 33 service_manager::ServiceContextRefFactory* service_ref_factory, |
| 34 ResourceCoordinatorService* resource_coordinator_service, |
| 35 const service_manager::BindSourceInfo& source_info, |
| 36 resource_coordinator::mojom::ServiceCallbacksRequest request); |
| 37 |
| 38 void IsUkmRecorderInterfaceInitialized( |
| 39 const IsUkmRecorderInterfaceInitializedCallback& callback) override; |
| 40 void SetUkmRecorderInterface(ukm::mojom::UkmRecorderInterfacePtr |
| 41 ukm_recorder_interface_request) override; |
| 42 |
| 43 private: |
| 44 ResourceCoordinatorService* resource_coordinator_service_; |
| 45 std::unique_ptr<service_manager::ServiceContextRef> service_ref_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(ServiceCallbacksImpl); |
| 48 }; |
| 49 |
| 50 } // namespace resource_coordinator |
| 51 |
| 52 #endif // SERVICES_RESOURCE_COORDINATOR_SERVICE_CALLBACKS_IMPL_H_ |
OLD | NEW |