summaryrefslogtreecommitdiff
path: root/www/chromium-uc/files/hid_service_fido.h
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/files/hid_service_fido.h')
-rw-r--r--www/chromium-uc/files/hid_service_fido.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/www/chromium-uc/files/hid_service_fido.h b/www/chromium-uc/files/hid_service_fido.h
new file mode 100644
index 0000000..40abd59
--- /dev/null
+++ b/www/chromium-uc/files/hid_service_fido.h
@@ -0,0 +1,42 @@
1// Copyright 2020 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 SERVICE_DEVICE_HID_HID_SERVICE_FIDO_H_
6#define SERVICE_DEVICE_HID_HID_SERVICE_FIDO_H_
7
8#include <string>
9
10#include "base/macros.h"
11#include "base/memory/ref_counted.h"
12#include "base/memory/weak_ptr.h"
13#include "services/device/hid/hid_service.h"
14
15namespace device {
16
17class HidServiceFido : public HidService {
18public:
19 HidServiceFido();
20 ~HidServiceFido() override;
21
22 void Connect(const std::string &device_guid,
23 bool allow_protected_reports,
24 bool allow_fido_reports,
25 ConnectCallback connect) override;
26 base::WeakPtr<HidService> GetWeakPtr() override;
27
28private:
29 class BlockingTaskHelper;
30 const scoped_refptr<base::SequencedTaskRunner> task_runner_;
31 const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
32 base::WeakPtrFactory<HidServiceFido> weak_factory_;
33 // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds
34 // a weak reference back to the service that owns it.
35 std::unique_ptr<BlockingTaskHelper> helper_;
36
37 DISALLOW_COPY_AND_ASSIGN(HidServiceFido);
38};
39
40} // namespace device
41
42#endif // SERVICE_DEVICE_HID_HID_SERVICE_FIDO_H_