OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_AUTOFILL_TEST_AUTOFILL_MANAGER_DELEGATE_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_TEST_AUTOFILL_MANAGER_DELEGATE_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "chrome/browser/autofill/autofill_manager_delegate.h" | |
10 | |
11 namespace autofill { | |
12 | |
13 // This class is only for easier writing of testings. All pure virtual functions | |
14 // have been giving empty methods. | |
15 class TestAutofillManagerDelegate : public AutofillManagerDelegate { | |
16 public: | |
17 TestAutofillManagerDelegate(); | |
18 virtual ~TestAutofillManagerDelegate(); | |
19 | |
20 // AutofillManagerDelegate implementation. | |
21 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; | |
22 virtual PrefService* GetPrefs() OVERRIDE; | |
23 virtual void HideRequestAutocompleteDialog() OVERRIDE; | |
24 virtual bool IsSavingPasswordsEnabled() const OVERRIDE; | |
25 virtual bool IsPasswordSyncEnabled() const OVERRIDE; | |
26 virtual void SetSyncStateChangedCallback( | |
27 const base::Closure& callback) OVERRIDE; | |
28 virtual void OnAutocheckoutError() OVERRIDE; | |
29 virtual void ShowAutofillSettings() OVERRIDE; | |
30 virtual void ConfirmSaveCreditCard( | |
31 const AutofillMetrics& metric_logger, | |
32 const CreditCard& credit_card, | |
33 const base::Closure& save_card_callback) OVERRIDE; | |
34 virtual void ShowPasswordGenerationBubble( | |
35 const gfx::Rect& bounds, | |
36 const content::PasswordForm& form, | |
37 autofill::PasswordGenerator* generator) OVERRIDE; | |
38 virtual void ShowAutocheckoutBubble( | |
39 const gfx::RectF& bounding_box, | |
40 const gfx::NativeView& native_view, | |
41 const base::Closure& callback) OVERRIDE; | |
42 virtual void ShowRequestAutocompleteDialog( | |
43 const FormData& form, | |
44 const GURL& source_url, | |
45 const content::SSLStatus& ssl_status, | |
46 const AutofillMetrics& metric_logger, | |
47 DialogType dialog_type, | |
48 const base::Callback<void(const FormStructure*)>& callback) OVERRIDE; | |
49 virtual void RequestAutocompleteDialogClosed() OVERRIDE; | |
50 virtual void ShowAutofillPopup(const gfx::RectF& element_bounds, | |
51 const std::vector<string16>& values, | |
52 const std::vector<string16>& labels, | |
53 const std::vector<string16>& icons, | |
54 const std::vector<int>& identifiers, | |
55 AutofillPopupDelegate* delegate) OVERRIDE; | |
56 virtual void HideAutofillPopup() OVERRIDE; | |
57 virtual void UpdateProgressBar(double value) OVERRIDE; | |
58 | |
59 private: | |
60 DISALLOW_COPY_AND_ASSIGN(TestAutofillManagerDelegate); | |
61 }; | |
62 | |
63 } // namespace autofill | |
64 | |
65 #endif // CHROME_BROWSER_AUTOFILL_TEST_AUTOFILL_MANAGER_DELEGATE_H_ | |
OLD | NEW |