| Index: services/resource_coordinator/resource_coordinator_service.h
|
| diff --git a/services/resource_coordinator/resource_coordinator_service.h b/services/resource_coordinator/resource_coordinator_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..42e0bc34eeafe8cd9ba57cedb3f339fb46a7f099
|
| --- /dev/null
|
| +++ b/services/resource_coordinator/resource_coordinator_service.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SERVICES_SPEED_SPEED_SERVICE_H_
|
| +#define SERVICES_SPEED_SPEED_SERVICE_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "services/service_manager/public/cpp/service.h"
|
| +#include "services/service_manager/public/cpp/service_context_ref.h"
|
| +
|
| +namespace resource_coordinator {
|
| +
|
| +class ResourceCoordinatorService : public service_manager::Service {
|
| + public:
|
| + ResourceCoordinatorService();
|
| + ~ResourceCoordinatorService() override;
|
| +
|
| + // service_manager::Service:
|
| + // Factory function for use as an embedded service.
|
| + static std::unique_ptr<service_manager::Service> Create();
|
| +
|
| + // service_manager::Service:
|
| + void OnStart() override;
|
| + bool OnConnect(const service_manager::ServiceInfo& remote_info,
|
| + service_manager::InterfaceRegistry* registry) override;
|
| +
|
| + private:
|
| + void MaybeRequestQuitDelayed();
|
| + void MaybeRequestQuit();
|
| +
|
| + std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
|
| + base::WeakPtrFactory<ResourceCoordinatorService> weak_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ResourceCoordinatorService);
|
| +};
|
| +
|
| +} // namespace resource_coordinator
|
| +
|
| +#endif // SERVICES_SPEED_SPEED_SERVICE_H_
|
|
|