webauthn_browser_bridge.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2022 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. #ifndef COMPONENTS_WEBAUTHN_ANDROID_WEBAUTHN_BROWSER_BRIDGE_H_
  5. #define COMPONENTS_WEBAUTHN_ANDROID_WEBAUTHN_BROWSER_BRIDGE_H_
  6. #include "base/android/scoped_java_ref.h"
  7. class WebAuthnBrowserBridge {
  8. public:
  9. WebAuthnBrowserBridge(JNIEnv* env,
  10. const base::android::JavaParamRef<jobject>& jbridge);
  11. WebAuthnBrowserBridge(const WebAuthnBrowserBridge&) = delete;
  12. WebAuthnBrowserBridge& operator=(const WebAuthnBrowserBridge&) = delete;
  13. ~WebAuthnBrowserBridge();
  14. void OnCredentialsDetailsListReceived(
  15. JNIEnv* env,
  16. const base::android::JavaParamRef<jobject>&,
  17. const base::android::JavaParamRef<jobjectArray>& credentials,
  18. const base::android::JavaParamRef<jobject>& jframe_host,
  19. const base::android::JavaParamRef<jobject>& jcallback) const;
  20. private:
  21. // Java object that owns this WebAuthnBrowserBridge.
  22. base::android::ScopedJavaGlobalRef<jobject> owner_;
  23. };
  24. #endif // COMPONENTS_WEBAUTHN_ANDROID_WEBAUTHN_BROWSER_BRIDGE_H_