blob: 1fee0ba24a926751e73586a26974f543ea5f25e7 [file] [log] [blame]
Ben Murdocheb525c52013-07-10 11:40:50 +01001// Copyright 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 COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_MANAGER_DELEGATE_H_
6#define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_MANAGER_DELEGATE_H_
7
8#include "base/compiler_specific.h"
9#include "base/i18n/rtl.h"
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010010#include "components/autofill/core/browser/autocheckout_bubble_state.h"
Ben Murdocheb525c52013-07-10 11:40:50 +010011#include "components/autofill/core/browser/autofill_manager_delegate.h"
12
13namespace autofill {
14
15// This class is only for easier writing of testings. All pure virtual functions
16// have been giving empty methods.
17class TestAutofillManagerDelegate : public AutofillManagerDelegate {
18 public:
19 TestAutofillManagerDelegate();
20 virtual ~TestAutofillManagerDelegate();
21
22 // AutofillManagerDelegate implementation.
23 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE;
24 virtual PrefService* GetPrefs() OVERRIDE;
25 virtual autocheckout::WhitelistManager*
26 GetAutocheckoutWhitelistManager() const OVERRIDE;
27 virtual void HideRequestAutocompleteDialog() OVERRIDE;
28 virtual void OnAutocheckoutError() OVERRIDE;
29 virtual void OnAutocheckoutSuccess() OVERRIDE;
30 virtual void ShowAutofillSettings() OVERRIDE;
31 virtual void ConfirmSaveCreditCard(
32 const AutofillMetrics& metric_logger,
33 const CreditCard& credit_card,
34 const base::Closure& save_card_callback) OVERRIDE;
Ben Murdochbb1529c2013-08-08 10:24:53 +010035 virtual bool ShowAutocheckoutBubble(
Ben Murdocheb525c52013-07-10 11:40:50 +010036 const gfx::RectF& bounding_box,
37 bool is_google_user,
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010038 const base::Callback<void(AutocheckoutBubbleState)>& callback) OVERRIDE;
Ben Murdocheb525c52013-07-10 11:40:50 +010039 virtual void HideAutocheckoutBubble() OVERRIDE;
40 virtual void ShowRequestAutocompleteDialog(
41 const FormData& form,
42 const GURL& source_url,
43 DialogType dialog_type,
44 const base::Callback<void(const FormStructure*,
45 const std::string&)>& callback) OVERRIDE;
46 virtual void ShowAutofillPopup(
47 const gfx::RectF& element_bounds,
48 base::i18n::TextDirection text_direction,
49 const std::vector<base::string16>& values,
50 const std::vector<base::string16>& labels,
51 const std::vector<base::string16>& icons,
52 const std::vector<int>& identifiers,
53 base::WeakPtr<AutofillPopupDelegate> delegate) OVERRIDE;
Ben Murdochca12bfa2013-07-23 11:17:05 +010054 virtual void UpdateAutofillPopupDataListValues(
55 const std::vector<base::string16>& values,
56 const std::vector<base::string16>& labels) OVERRIDE;
Ben Murdocheb525c52013-07-10 11:40:50 +010057 virtual void HideAutofillPopup() OVERRIDE;
58 virtual bool IsAutocompleteEnabled() OVERRIDE;
59
60 virtual void AddAutocheckoutStep(AutocheckoutStepType step_type) OVERRIDE;
61 virtual void UpdateAutocheckoutStep(
62 AutocheckoutStepType step_type,
63 AutocheckoutStepStatus step_status) OVERRIDE;
64
65 private:
66 DISALLOW_COPY_AND_ASSIGN(TestAutofillManagerDelegate);
67};
68
69} // namespace autofill
70
71#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_MANAGER_DELEGATE_H_