#include "services/device/hid/hid_manager_impl.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/lazy_instance.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/device/hid/hid_connection_impl.h"
namespace device {
base::LazyInstance<std::unique_ptr<HidService>>::Leaky g_hid_service = …;
HidManagerImpl::HidManagerImpl() { … }
HidManagerImpl::~HidManagerImpl() { … }
void HidManagerImpl::SetHidServiceForTesting(
std::unique_ptr<HidService> hid_service) { … }
bool HidManagerImpl::IsHidServiceTesting() { … }
void HidManagerImpl::AddReceiver(
mojo::PendingReceiver<mojom::HidManager> receiver) { … }
void HidManagerImpl::GetDevicesAndSetClient(
mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
GetDevicesCallback callback) { … }
void HidManagerImpl::GetDevices(GetDevicesCallback callback) { … }
void HidManagerImpl::CreateDeviceList(
GetDevicesCallback callback,
mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
std::vector<mojom::HidDeviceInfoPtr> devices) { … }
void HidManagerImpl::Connect(
const std::string& device_guid,
mojo::PendingRemote<mojom::HidConnectionClient> connection_client,
mojo::PendingRemote<mojom::HidConnectionWatcher> watcher,
bool allow_protected_reports,
bool allow_fido_reports,
ConnectCallback callback) { … }
void HidManagerImpl::CreateConnection(
ConnectCallback callback,
mojo::PendingRemote<mojom::HidConnectionClient> connection_client,
mojo::PendingRemote<mojom::HidConnectionWatcher> watcher,
scoped_refptr<HidConnection> connection) { … }
void HidManagerImpl::OnDeviceAdded(mojom::HidDeviceInfoPtr device) { … }
void HidManagerImpl::OnDeviceRemoved(mojom::HidDeviceInfoPtr device) { … }
void HidManagerImpl::OnDeviceChanged(mojom::HidDeviceInfoPtr device) { … }
}