| 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 COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void PropagateAutofillPredictions( | 66 void PropagateAutofillPredictions( |
| 67 content::RenderFrameHost* rfh, | 67 content::RenderFrameHost* rfh, |
| 68 const std::vector<autofill::FormStructure*>& forms) override; | 68 const std::vector<autofill::FormStructure*>& forms) override; |
| 69 void DidFillOrPreviewField(const base::string16& autofilled_value, | 69 void DidFillOrPreviewField(const base::string16& autofilled_value, |
| 70 const base::string16& profile_full_name) override; | 70 const base::string16& profile_full_name) override; |
| 71 // By default, TestAutofillClient will report that the context is | 71 // By default, TestAutofillClient will report that the context is |
| 72 // secure. This can be adjusted by calling set_form_origin() with an | 72 // secure. This can be adjusted by calling set_form_origin() with an |
| 73 // http:// URL. | 73 // http:// URL. |
| 74 bool IsContextSecure() override; | 74 bool IsContextSecure() override; |
| 75 bool ShouldShowSigninPromo() override; | 75 bool ShouldShowSigninPromo() override; |
| 76 void StartSigninFlow() override; | |
| 77 void ShowHttpNotSecureExplanation() override; | |
| 78 bool IsAutofillSupported() override; | 76 bool IsAutofillSupported() override; |
| 77 void ExecuteCommand(int id) override; |
| 79 | 78 |
| 80 void SetPrefs(std::unique_ptr<PrefService> prefs) { | 79 void SetPrefs(std::unique_ptr<PrefService> prefs) { |
| 81 prefs_ = std::move(prefs); | 80 prefs_ = std::move(prefs); |
| 82 } | 81 } |
| 83 | 82 |
| 84 void set_form_origin(const GURL& url) { form_origin_ = url; } | 83 void set_form_origin(const GURL& url) { form_origin_ = url; } |
| 85 | 84 |
| 86 private: | 85 private: |
| 87 // NULL by default. | 86 // NULL by default. |
| 88 std::unique_ptr<PrefService> prefs_; | 87 std::unique_ptr<PrefService> prefs_; |
| 89 std::unique_ptr<FakeOAuth2TokenService> token_service_; | 88 std::unique_ptr<FakeOAuth2TokenService> token_service_; |
| 90 std::unique_ptr<FakeIdentityProvider> identity_provider_; | 89 std::unique_ptr<FakeIdentityProvider> identity_provider_; |
| 91 #if !defined(OS_ANDROID) | 90 #if !defined(OS_ANDROID) |
| 92 std::unique_ptr<SaveCardBubbleController> save_card_bubble_controller_; | 91 std::unique_ptr<SaveCardBubbleController> save_card_bubble_controller_; |
| 93 #endif | 92 #endif |
| 94 GURL form_origin_; | 93 GURL form_origin_; |
| 95 | 94 |
| 96 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); | 95 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); |
| 97 }; | 96 }; |
| 98 | 97 |
| 99 } // namespace autofill | 98 } // namespace autofill |
| 100 | 99 |
| 101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 100 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| OLD | NEW |