blob: 6f55953f91b6b2e5fcb28bf961d7c7fc3e327399 [file] [log] [blame]
// Copyright 2016 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_DEVICE_DEVICE_SERVICE_H_
#define SERVICES_DEVICE_DEVICE_SERVICE_H_
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
namespace device {
std::unique_ptr<service_manager::Service> CreateDeviceService(
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
class DeviceService : public service_manager::Service {
public:
explicit DeviceService(
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
~DeviceService() override;
private:
// service_manager::Service:
void OnStart() override;
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override;
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
DISALLOW_COPY_AND_ASSIGN(DeviceService);
};
} // namespace device
#endif // SERVICES_DEVICE_DEVICE_SERVICE_H_