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 CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ |
6 #define CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 MockCredentialManagerClient(); | 25 MockCredentialManagerClient(); |
26 ~MockCredentialManagerClient() override; | 26 ~MockCredentialManagerClient() override; |
27 | 27 |
28 // We take ownership of the |credential|. | 28 // We take ownership of the |credential|. |
29 void SetResponse(blink::WebCredential* credential); | 29 void SetResponse(blink::WebCredential* credential); |
30 void SetError(const std::string& error); | 30 void SetError(const std::string& error); |
31 | 31 |
32 // blink::WebCredentialManager: | 32 // blink::WebCredentialManager: |
33 void DispatchStore(const blink::WebCredential& credential, | 33 void DispatchStore(const blink::WebCredential& credential, |
34 NotificationCallbacks* callbacks) override; | 34 NotificationCallbacks* callbacks) override; |
35 void DispatchRequireUserMediation(NotificationCallbacks* callbacks) override; | 35 void DispatchPreventSilentAccess(NotificationCallbacks* callbacks) override; |
36 void DispatchGet(blink::WebCredentialMediationRequirement mediation, | 36 void DispatchGet(blink::WebCredentialMediationRequirement mediation, |
37 bool include_passwords, | 37 bool include_passwords, |
38 const blink::WebVector<blink::WebURL>& federations, | 38 const blink::WebVector<blink::WebURL>& federations, |
39 RequestCallbacks* callbacks) override; | 39 RequestCallbacks* callbacks) override; |
40 | 40 |
41 private: | 41 private: |
42 std::unique_ptr<blink::WebCredential> credential_; | 42 std::unique_ptr<blink::WebCredential> credential_; |
43 blink::WebCredentialManagerError error_; | 43 blink::WebCredentialManagerError error_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(MockCredentialManagerClient); | 45 DISALLOW_COPY_AND_ASSIGN(MockCredentialManagerClient); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace test_runner | 48 } // namespace test_runner |
49 | 49 |
50 #endif // CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ | 50 #endif // CONTENT_SHELL_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_ |
OLD | NEW |