| Index: device/fingerprint/fingerprint_impl.h
|
| diff --git a/device/fingerprint/fingerprint_impl.h b/device/fingerprint/fingerprint_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e4f61ed8f1bb2368448c6d50d4fab78a38bf5973
|
| --- /dev/null
|
| +++ b/device/fingerprint/fingerprint_impl.h
|
| @@ -0,0 +1,71 @@
|
| +// Copyright 2016 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 DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
|
| +#define DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include "base/macros.h"
|
| +#include "dbus/object_path.h"
|
| +#include "device/fingerprint/fingerprint_export.h"
|
| +#include "device/fingerprint/public/interfaces/fingerprint.mojom.h"
|
| +
|
| +namespace device {
|
| +
|
| +class DEVICE_FINGERPRINT_EXPORT FingerprintImpl : public mojom::Fingerprint {
|
| + public:
|
| + explicit FingerprintImpl();
|
| + ~FingerprintImpl() override;
|
| +
|
| + static void Create(device::mojom::FingerprintRequest request);
|
| +
|
| + // Overridden from 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<FingerprintImpl> weak_ptr_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FingerprintImpl);
|
| +};
|
| +
|
| +} // namespace device
|
| +
|
| +#endif // DEVICE_FINGERPRINT_FINGERPRINT_IMPL_H_
|
|
|