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

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

Issue 2533863002: Add WebAuthn bindings and client interface. (Closed)
Patch Set: Layout test expected file tweaks Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webauth/WebAuthentication.h
diff --git a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
new file mode 100644
index 0000000000000000000000000000000000000000..abffd5f248c8977d2475a2932c655bfebab51705
--- /dev/null
+++ b/third_party/WebKit/Source/modules/webauth/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/webauth/AuthenticationAssertionOptions.h"
+#include "modules/webauth/RelyingPartyAccount.h"
+#include "modules/webauth/ScopedCredentialOptions.h"
+#include "modules/webauth/ScopedCredentialParameters.h"
+
+namespace blink {
+
+class LocalFrame;
+class ScriptState;
+class RelyingPartyAccount;
+class AuthenticationAssertionOptions;
+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 RelyingPartyAccount&,
+ const HeapVector<ScopedCredentialParameters>,
+ const BufferSource&,
+ ScopedCredentialOptions&);
+ ScriptPromise getAssertion(ScriptState*,
+ const BufferSource&,
+ const AuthenticationAssertionOptions&);
+
+ DEFINE_INLINE_TRACE() {}
+
+ private:
+ explicit WebAuthentication(LocalFrame&);
+};
+
+} // namespace blink
+
+#endif // WebAuthentication_h

Powered by Google App Engine
This is Rietveld 408576698