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

Unified Diff: third_party/WebKit/Source/modules/webauthentication/WebAuthentication.h

Issue 2533863002: Add WebAuthn bindings and client interface. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webauthentication/WebAuthentication.h
diff --git a/third_party/WebKit/Source/modules/webauthentication/WebAuthentication.h b/third_party/WebKit/Source/modules/webauthentication/WebAuthentication.h
new file mode 100644
index 0000000000000000000000000000000000000000..e6f9b660ee447edbb6899c79e48f67c47532b388
--- /dev/null
+++ b/third_party/WebKit/Source/modules/webauthentication/WebAuthentication.h
@@ -0,0 +1,59 @@
+// Copyright 2015 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 WebAuthentication_h
+#define WebAuthentication_h
+
+#include "bindings/core/v8/ArrayBufferOrArrayBufferView.h"
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/DOMArrayBuffer.h"
+#include "modules/webauthentication/Account.h"
+#include "modules/webauthentication/AssertionOptions.h"
+#include "modules/webauthentication/ScopedCredentialOptions.h"
+#include "modules/webauthentication/ScopedCredentialParameters.h"
+
+namespace blink {
+
+class LocalFrame;
+class ScriptState;
+class Account;
+class AssertionOptions;
+class ScopedCredentialParameters;
+class ScopedCredentialOptions;
+
+typedef ArrayBufferOrArrayBufferView BufferSource;
+
+class WebAuthentication final
+ : public GarbageCollectedFinalized<WebAuthentication>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ static WebAuthentication* create(LocalFrame& frame) {
+ return new WebAuthentication(frame);
+ }
+
+ virtual ~WebAuthentication();
+
+ void dispose();
+
+ ScriptPromise makeCredential(ScriptState*,
+ const Account&,
+ const HeapVector<ScopedCredentialParameters>,
+ const BufferSource&,
+ ScopedCredentialOptions&);
+ ScriptPromise getAssertion(ScriptState*,
+ const BufferSource&,
+ const AssertionOptions&);
+
+ DEFINE_INLINE_TRACE() {}
+
+ private:
+ explicit WebAuthentication(LocalFrame&);
+};
+
+} // namespace blink
+
+#endif // WebAuthentication_h

Powered by Google App Engine
This is Rietveld 408576698