| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CredentialsContainer_h | 5 #ifndef CredentialsContainer_h |
| 6 #define CredentialsContainer_h | 6 #define CredentialsContainer_h |
| 7 | 7 |
| 8 #include "modules/ModulesExport.h" | 8 #include "modules/ModulesExport.h" |
| 9 #include "platform/bindings/ScriptWrappable.h" | 9 #include "platform/bindings/ScriptWrappable.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class Credential; | 14 class Credential; |
| 15 class CredentialCreationOptions; |
| 15 class CredentialRequestOptions; | 16 class CredentialRequestOptions; |
| 17 class ExceptionState; |
| 16 class ScriptPromise; | 18 class ScriptPromise; |
| 17 class ScriptState; | 19 class ScriptState; |
| 18 | 20 |
| 19 class MODULES_EXPORT CredentialsContainer final | 21 class MODULES_EXPORT CredentialsContainer final |
| 20 : public GarbageCollected<CredentialsContainer>, | 22 : public GarbageCollected<CredentialsContainer>, |
| 21 public ScriptWrappable { | 23 public ScriptWrappable { |
| 22 DEFINE_WRAPPERTYPEINFO(); | 24 DEFINE_WRAPPERTYPEINFO(); |
| 23 | 25 |
| 24 public: | 26 public: |
| 25 static CredentialsContainer* Create(); | 27 static CredentialsContainer* Create(); |
| 26 | 28 |
| 27 // CredentialsContainer.h | 29 // CredentialsContainer.idl |
| 28 ScriptPromise get(ScriptState*, const CredentialRequestOptions&); | 30 ScriptPromise get(ScriptState*, const CredentialRequestOptions&); |
| 29 ScriptPromise store(ScriptState*, Credential* = 0); | 31 ScriptPromise store(ScriptState*, Credential* = 0); |
| 32 ScriptPromise create(ScriptState*, |
| 33 const CredentialCreationOptions&, |
| 34 ExceptionState&); |
| 30 ScriptPromise requireUserMediation(ScriptState*); | 35 ScriptPromise requireUserMediation(ScriptState*); |
| 31 | 36 |
| 32 DEFINE_INLINE_VIRTUAL_TRACE() {} | 37 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 33 | 38 |
| 34 private: | 39 private: |
| 35 CredentialsContainer(); | 40 CredentialsContainer(); |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 } // namespace blink | 43 } // namespace blink |
| 39 | 44 |
| 40 #endif // CredentialsContainer_h | 45 #endif // CredentialsContainer_h |
| OLD | NEW |