Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.h

Issue 23033016: Remove autocheckout code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more deletes, and Ilya review. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
13 #include "components/autofill/content/browser/autocheckout_steps.h"
14 #include "components/autofill/core/browser/autocheckout_bubble_state.h"
15 #include "components/autofill/core/browser/autofill_manager_delegate.h" 12 #include "components/autofill/core/browser/autofill_manager_delegate.h"
16 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
17 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
18 15
19 namespace content { 16 namespace content {
20 struct FrameNavigateParams; 17 struct FrameNavigateParams;
21 struct LoadCommittedDetails; 18 struct LoadCommittedDetails;
22 class WebContents; 19 class WebContents;
23 } 20 }
24 21
25 namespace autofill { 22 namespace autofill {
26 23
27 class AutocheckoutBubble;
28 class AutofillDialogController; 24 class AutofillDialogController;
29 class AutofillPopupControllerImpl; 25 class AutofillPopupControllerImpl;
30 struct FormData; 26 struct FormData;
31 27
32 // Chrome implementation of AutofillManagerDelegate. 28 // Chrome implementation of AutofillManagerDelegate.
33 class TabAutofillManagerDelegate 29 class TabAutofillManagerDelegate
34 : public AutofillManagerDelegate, 30 : public AutofillManagerDelegate,
35 public content::WebContentsUserData<TabAutofillManagerDelegate>, 31 public content::WebContentsUserData<TabAutofillManagerDelegate>,
36 public content::WebContentsObserver { 32 public content::WebContentsObserver {
37 public: 33 public:
38 virtual ~TabAutofillManagerDelegate(); 34 virtual ~TabAutofillManagerDelegate();
39 35
40 // Called when the tab corresponding to |this| instance is activated. 36 // Called when the tab corresponding to |this| instance is activated.
41 void TabActivated(int reason); 37 void TabActivated(int reason);
42 38
43 // AutofillManagerDelegate implementation. 39 // AutofillManagerDelegate implementation.
44 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; 40 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE;
45 virtual PrefService* GetPrefs() OVERRIDE; 41 virtual PrefService* GetPrefs() OVERRIDE;
46 virtual autocheckout::WhitelistManager*
47 GetAutocheckoutWhitelistManager() const OVERRIDE;
48 virtual void HideRequestAutocompleteDialog() OVERRIDE; 42 virtual void HideRequestAutocompleteDialog() OVERRIDE;
49 virtual void OnAutocheckoutError() OVERRIDE;
50 virtual void OnAutocheckoutSuccess() OVERRIDE;
51 virtual void ShowAutofillSettings() OVERRIDE; 43 virtual void ShowAutofillSettings() OVERRIDE;
52 virtual void ConfirmSaveCreditCard( 44 virtual void ConfirmSaveCreditCard(
53 const AutofillMetrics& metric_logger, 45 const AutofillMetrics& metric_logger,
54 const CreditCard& credit_card, 46 const CreditCard& credit_card,
55 const base::Closure& save_card_callback) OVERRIDE; 47 const base::Closure& save_card_callback) OVERRIDE;
56 virtual bool ShowAutocheckoutBubble(
57 const gfx::RectF& bounds,
58 bool is_google_user,
59 const base::Callback<void(AutocheckoutBubbleState)>& callback) OVERRIDE;
60 virtual void HideAutocheckoutBubble() OVERRIDE;
61 virtual void ShowRequestAutocompleteDialog( 48 virtual void ShowRequestAutocompleteDialog(
62 const FormData& form, 49 const FormData& form,
63 const GURL& source_url, 50 const GURL& source_url,
64 DialogType dialog_type, 51 DialogType dialog_type,
65 const base::Callback<void(const FormStructure*, 52 const base::Callback<void(const FormStructure*,
66 const std::string&)>& callback) OVERRIDE; 53 const std::string&)>& callback) OVERRIDE;
67 virtual void ShowAutofillPopup( 54 virtual void ShowAutofillPopup(
68 const gfx::RectF& element_bounds, 55 const gfx::RectF& element_bounds,
69 base::i18n::TextDirection text_direction, 56 base::i18n::TextDirection text_direction,
70 const std::vector<string16>& values, 57 const std::vector<string16>& values,
71 const std::vector<string16>& labels, 58 const std::vector<string16>& labels,
72 const std::vector<string16>& icons, 59 const std::vector<string16>& icons,
73 const std::vector<int>& identifiers, 60 const std::vector<int>& identifiers,
74 base::WeakPtr<AutofillPopupDelegate> delegate) OVERRIDE; 61 base::WeakPtr<AutofillPopupDelegate> delegate) OVERRIDE;
75 virtual void UpdateAutofillPopupDataListValues( 62 virtual void UpdateAutofillPopupDataListValues(
76 const std::vector<base::string16>& values, 63 const std::vector<base::string16>& values,
77 const std::vector<base::string16>& labels) OVERRIDE; 64 const std::vector<base::string16>& labels) OVERRIDE;
78 virtual void HideAutofillPopup() OVERRIDE; 65 virtual void HideAutofillPopup() OVERRIDE;
79 virtual bool IsAutocompleteEnabled() OVERRIDE; 66 virtual bool IsAutocompleteEnabled() OVERRIDE;
80 67
81 virtual void AddAutocheckoutStep(AutocheckoutStepType step_type) OVERRIDE;
82 virtual void UpdateAutocheckoutStep(
83 AutocheckoutStepType step_type,
84 AutocheckoutStepStatus step_status) OVERRIDE;
85
86 // content::WebContentsObserver implementation. 68 // content::WebContentsObserver implementation.
87 virtual void DidNavigateMainFrame( 69 virtual void DidNavigateMainFrame(
88 const content::LoadCommittedDetails& details, 70 const content::LoadCommittedDetails& details,
89 const content::FrameNavigateParams& params) OVERRIDE; 71 const content::FrameNavigateParams& params) OVERRIDE;
90 virtual void WebContentsDestroyed( 72 virtual void WebContentsDestroyed(
91 content::WebContents* web_contents) OVERRIDE; 73 content::WebContents* web_contents) OVERRIDE;
92 virtual void WasShown() OVERRIDE; 74 virtual void WasShown() OVERRIDE;
93 75
94 // Exposed for testing. 76 // Exposed for testing.
95 AutofillDialogController* GetDialogControllerForTesting() { 77 AutofillDialogController* GetDialogControllerForTesting() {
96 return dialog_controller_.get(); 78 return dialog_controller_.get();
97 } 79 }
98 80
99 private: 81 private:
100 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); 82 explicit TabAutofillManagerDelegate(content::WebContents* web_contents);
101 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; 83 friend class content::WebContentsUserData<TabAutofillManagerDelegate>;
102 84
103 content::WebContents* const web_contents_; 85 content::WebContents* const web_contents_;
104 base::WeakPtr<AutofillDialogController> dialog_controller_; 86 base::WeakPtr<AutofillDialogController> dialog_controller_;
105 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_;
106 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; 87 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_;
107 88
108 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); 89 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate);
109 }; 90 };
110 91
111 } // namespace autofill 92 } // namespace autofill
112 93
113 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 94 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698