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

Side by Side Diff: services/device/fingerprint/fingerprint_impl_chromeos.h

Issue 2664353002: Host fingerprint mojo service within the device service. (Closed)
Patch Set: Modify 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 2017 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 SERVICES_DEVICE_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_
6 #define SERVICES_DEVICE_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "dbus/object_path.h"
12 #include "services/device/public/interfaces/fingerprint.mojom.h"
13
14 namespace device {
15
16 class FingerprintImplChromeOS : public mojom::Fingerprint {
blundell 2017/02/06 14:52:43 nit: Could use a class comment.
xiaoyinh(OOO Sep 11-29) 2017/02/22 00:04:50 Done.
17 public:
18 explicit FingerprintImplChromeOS();
19 ~FingerprintImplChromeOS() override;
20
21 // mojom::Fingerprint:
22 void GetFingerprintsList(
23 const GetFingerprintsListCallback& callback) override;
24 void StartEnroll(const std::string& user_id,
25 const std::string& label) override;
26 void CancelCurrentEnroll() override;
27 void GetLabel(int32_t index, const GetLabelCallback& callback) override;
28 void SetLabel(const std::string& label, int32_t index) override;
29 void RemoveEnrollment(int32_t index) override;
30 void StartAuthentication() override;
31 void EndCurrentAuthentication() override;
32 void DestroyAllEnrollments() override;
33 void AddBiodObserver(mojom::BiodObserverPtr observer) override;
34
35 private:
36 void OnBiodObserverDisconnected(mojom::BiodObserver* observer);
37 void OnStartEnroll(const dbus::ObjectPath& enroll_path);
38 void OnStartAuthentication(const dbus::ObjectPath& auth_path);
39 void OnGetFingerprintsList(
40 const GetFingerprintsListCallback& callback,
41 const std::vector<dbus::ObjectPath>& enrollment_paths);
42 void OnGetLabelFromEnrollmentPath(const GetFingerprintsListCallback& callback,
43 size_t num_enrollments,
44 std::vector<std::string>* out_labels,
45 const std::string& label);
46
47 void OnGetLabel(int32_t index,
48 const GetLabelCallback& callback,
49 const std::vector<dbus::ObjectPath>& enrollment_paths);
50 void OnSetLabel(const std::string& new_label,
51 int index,
52 const std::vector<dbus::ObjectPath>& enrollment_paths);
53 void OnRemoveEnrollment(
54 int index,
55 const std::vector<dbus::ObjectPath>& enrollment_paths);
56
57 std::vector<mojom::BiodObserverPtr> observers_;
58 std::unique_ptr<dbus::ObjectPath> current_enroll_path_;
59 std::unique_ptr<dbus::ObjectPath> current_auth_path_;
60
61 base::WeakPtrFactory<FingerprintImplChromeOS> weak_ptr_factory_;
62
63 DISALLOW_COPY_AND_ASSIGN(FingerprintImplChromeOS);
64 };
65
66 } // namespace device
67
68 #endif // SERVICES_DEVICE_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698