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 "modules/credentialmanager/CredentialsContainer.h" | 5 #include "modules/credentialmanager/CredentialsContainer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include "bindings/core/v8/Dictionary.h" | 9 #include "bindings/core/v8/Dictionary.h" |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 options.password().getAsHTMLFormElement(), exception_state)); | 270 options.password().getAsHTMLFormElement(), exception_state)); |
271 } | 271 } |
272 } else { | 272 } else { |
273 resolver->Resolve( | 273 resolver->Resolve( |
274 FederatedCredential::Create(options.federated(), exception_state)); | 274 FederatedCredential::Create(options.federated(), exception_state)); |
275 } | 275 } |
276 | 276 |
277 return promise; | 277 return promise; |
278 } | 278 } |
279 | 279 |
280 ScriptPromise CredentialsContainer::requireUserMediation( | 280 ScriptPromise CredentialsContainer::preventSilentAccess( |
281 ScriptState* script_state) { | 281 ScriptState* script_state) { |
282 ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); | 282 ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); |
283 ScriptPromise promise = resolver->Promise(); | 283 ScriptPromise promise = resolver->Promise(); |
284 if (!CheckBoilerplate(resolver)) | 284 if (!CheckBoilerplate(resolver)) |
285 return promise; | 285 return promise; |
286 | 286 |
287 CredentialManagerClient::From(ExecutionContext::From(script_state)) | 287 CredentialManagerClient::From(ExecutionContext::From(script_state)) |
288 ->DispatchRequireUserMediation(new NotificationCallbacks(resolver)); | 288 ->DispatchPreventSilentAccess(new NotificationCallbacks(resolver)); |
289 return promise; | 289 return promise; |
290 } | 290 } |
291 | 291 |
| 292 ScriptPromise CredentialsContainer::requireUserMediation( |
| 293 ScriptState* script_state) { |
| 294 return preventSilentAccess(script_state); |
| 295 } |
| 296 |
292 } // namespace blink | 297 } // namespace blink |
OLD | NEW |