| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" | |
| 6 | |
| 7 #include "third_party/WebKit/public/platform/WebCredential.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 MockCredentialManagerClient::MockCredentialManagerClient() { | |
| 12 } | |
| 13 | |
| 14 MockCredentialManagerClient::~MockCredentialManagerClient() { | |
| 15 } | |
| 16 | |
| 17 void MockCredentialManagerClient::SetResponse( | |
| 18 blink::WebCredential* credential) { | |
| 19 credential_.reset(credential); | |
| 20 } | |
| 21 | |
| 22 void MockCredentialManagerClient::dispatchFailedSignIn( | |
| 23 const blink::WebCredential&, | |
| 24 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) { | |
| 25 callbacks->onSuccess(); | |
| 26 delete callbacks; | |
| 27 } | |
| 28 | |
| 29 void MockCredentialManagerClient::dispatchSignedIn( | |
| 30 const blink::WebCredential&, | |
| 31 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) { | |
| 32 callbacks->onSuccess(); | |
| 33 delete callbacks; | |
| 34 } | |
| 35 | |
| 36 void MockCredentialManagerClient::dispatchSignedOut( | |
| 37 NotificationCallbacks* callbacks) { | |
| 38 callbacks->onSuccess(); | |
| 39 delete callbacks; | |
| 40 } | |
| 41 | |
| 42 void MockCredentialManagerClient::dispatchRequest( | |
| 43 bool zeroClickOnly, | |
| 44 const blink::WebVector<blink::WebURL>& federations, | |
| 45 RequestCallbacks* callbacks) { | |
| 46 callbacks->onSuccess(credential_.get()); | |
| 47 delete callbacks; | |
| 48 } | |
| 49 | |
| 50 } // namespace content | |
| OLD | NEW |