Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: device/fingerprint/fingerprint_impl.h

Issue 2664353002: Host fingerprint mojo service within the device service. (Closed)
Patch Set: try to fix BUILD.gn Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
6 #define DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "dbus/object_path.h"
12 #include "device/fingerprint/fingerprint_export.h"
13 #include "device/fingerprint/public/interfaces/fingerprint.mojom.h"
14
15 namespace device {
16
17 class DEVICE_FINGERPRINT_EXPORT FingerprintImpl : public mojom::Fingerprint {
18 public:
19 explicit FingerprintImpl();
20 ~FingerprintImpl() override;
21
22 static void Create(device::mojom::FingerprintRequest request);
23
24 // Overridden from mojom::Fingerprint:
25 void GetFingerprintsList(
26 const GetFingerprintsListCallback& callback) override;
27 void StartEnroll(const std::string& user_id,
28 const std::string& label) override;
29 void CancelCurrentEnroll() override;
30 void GetLabel(int32_t index, const GetLabelCallback& callback) override;
31 void SetLabel(const std::string& label, int32_t index) override;
32 void RemoveEnrollment(int32_t index) override;
33 void StartAuthentication() override;
34 void EndCurrentAuthentication() override;
35 void DestroyAllEnrollments() override;
36 void AddBiodObserver(mojom::BiodObserverPtr observer) override;
37
38 private:
39 void OnBiodObserverDisconnected(mojom::BiodObserver* observer);
40 void OnStartEnroll(const dbus::ObjectPath& enroll_path);
41 void OnStartAuthentication(const dbus::ObjectPath& auth_path);
42 void OnGetFingerprintsList(
43 const GetFingerprintsListCallback& callback,
44 const std::vector<dbus::ObjectPath>& enrollment_paths);
45 void OnGetLabelFromEnrollmentPath(const GetFingerprintsListCallback& callback,
46 size_t num_enrollments,
47 std::vector<std::string>* out_labels,
48 const std::string& label);
49
50 void OnGetLabel(int32_t index,
51 const GetLabelCallback& callback,
52 const std::vector<dbus::ObjectPath>& enrollment_paths);
53 void OnSetLabel(const std::string& new_label,
54 int index,
55 const std::vector<dbus::ObjectPath>& enrollment_paths);
56 void OnRemoveEnrollment(
57 int index,
58 const std::vector<dbus::ObjectPath>& enrollment_paths);
59
60 std::vector<mojom::BiodObserverPtr> observers_;
61 std::unique_ptr<dbus::ObjectPath> current_enroll_path_;
62 std::unique_ptr<dbus::ObjectPath> current_auth_path_;
63
64 base::WeakPtrFactory<FingerprintImpl> weak_ptr_factory_;
65
66 DISALLOW_COPY_AND_ASSIGN(FingerprintImpl);
67 };
68
69 } // namespace device
70
71 #endif // DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698