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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/credentialmanager/CredentialsContainer.h" | 6 #include "modules/credentialmanager/CredentialsContainer.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "bindings/core/v8/ScriptPromiseResolver.h" | 10 #include "bindings/core/v8/ScriptPromiseResolver.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 { | 141 { |
142 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); | 142 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); |
143 ScriptPromise promise = resolver->promise(); | 143 ScriptPromise promise = resolver->promise(); |
144 if (!checkBoilerplate(resolver)) | 144 if (!checkBoilerplate(resolver)) |
145 return promise; | 145 return promise; |
146 | 146 |
147 CredentialManagerClient::from(scriptState->executionContext())->dispatchFail
edSignIn(WebCredential::create(credential->platformCredential()), new Notificati
onCallbacks(resolver)); | 147 CredentialManagerClient::from(scriptState->executionContext())->dispatchFail
edSignIn(WebCredential::create(credential->platformCredential()), new Notificati
onCallbacks(resolver)); |
148 return promise; | 148 return promise; |
149 } | 149 } |
150 | 150 |
151 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState) | 151 ScriptPromise CredentialsContainer::requireUserMediation(ScriptState* scriptStat
e) |
152 { | 152 { |
153 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); | 153 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); |
154 ScriptPromise promise = resolver->promise(); | 154 ScriptPromise promise = resolver->promise(); |
155 if (!checkBoilerplate(resolver)) | 155 if (!checkBoilerplate(resolver)) |
156 return promise; | 156 return promise; |
157 | 157 |
158 CredentialManagerClient::from(scriptState->executionContext())->dispatchSign
edOut(new NotificationCallbacks(resolver)); | 158 CredentialManagerClient::from(scriptState->executionContext())->dispatchRequ
ireUserMediation(new NotificationCallbacks(resolver)); |
159 return promise; | 159 return promise; |
160 } | 160 } |
161 | 161 |
162 } // namespace blink | 162 } // namespace blink |
OLD | NEW |