Index: services/device/fingerprint/fingerprint_impl_chromeos.h |
diff --git a/services/device/fingerprint/fingerprint_impl_chromeos.h b/services/device/fingerprint/fingerprint_impl_chromeos.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8a318f6d1fba014c3473fc552acefb7eddccbaab |
--- /dev/null |
+++ b/services/device/fingerprint/fingerprint_impl_chromeos.h |
@@ -0,0 +1,68 @@ |
+// Copyright 2017 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_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_ |
+#define SERVICES_DEVICE_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_ |
+ |
+#include <stdint.h> |
+ |
+#include "base/macros.h" |
+#include "dbus/object_path.h" |
+#include "services/device/public/interfaces/fingerprint.mojom.h" |
+ |
+namespace device { |
+ |
+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.
|
+ public: |
+ explicit FingerprintImplChromeOS(); |
+ ~FingerprintImplChromeOS() override; |
+ |
+ // mojom::Fingerprint: |
+ void GetFingerprintsList( |
+ const GetFingerprintsListCallback& callback) override; |
+ void StartEnroll(const std::string& user_id, |
+ const std::string& label) override; |
+ void CancelCurrentEnroll() override; |
+ void GetLabel(int32_t index, const GetLabelCallback& callback) override; |
+ void SetLabel(const std::string& label, int32_t index) override; |
+ void RemoveEnrollment(int32_t index) override; |
+ void StartAuthentication() override; |
+ void EndCurrentAuthentication() override; |
+ void DestroyAllEnrollments() override; |
+ void AddBiodObserver(mojom::BiodObserverPtr observer) override; |
+ |
+ private: |
+ void OnBiodObserverDisconnected(mojom::BiodObserver* observer); |
+ void OnStartEnroll(const dbus::ObjectPath& enroll_path); |
+ void OnStartAuthentication(const dbus::ObjectPath& auth_path); |
+ void OnGetFingerprintsList( |
+ const GetFingerprintsListCallback& callback, |
+ const std::vector<dbus::ObjectPath>& enrollment_paths); |
+ void OnGetLabelFromEnrollmentPath(const GetFingerprintsListCallback& callback, |
+ size_t num_enrollments, |
+ std::vector<std::string>* out_labels, |
+ const std::string& label); |
+ |
+ void OnGetLabel(int32_t index, |
+ const GetLabelCallback& callback, |
+ const std::vector<dbus::ObjectPath>& enrollment_paths); |
+ void OnSetLabel(const std::string& new_label, |
+ int index, |
+ const std::vector<dbus::ObjectPath>& enrollment_paths); |
+ void OnRemoveEnrollment( |
+ int index, |
+ const std::vector<dbus::ObjectPath>& enrollment_paths); |
+ |
+ std::vector<mojom::BiodObserverPtr> observers_; |
+ std::unique_ptr<dbus::ObjectPath> current_enroll_path_; |
+ std::unique_ptr<dbus::ObjectPath> current_auth_path_; |
+ |
+ base::WeakPtrFactory<FingerprintImplChromeOS> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FingerprintImplChromeOS); |
+}; |
+ |
+} // namespace device |
+ |
+#endif // SERVICES_DEVICE_FINGERPRINT_FINGERPRINT_IMPL_CHROMEOS_H_ |