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

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

Issue 710453002: [Autofill] Componentize AutofillCCInfoBarDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses Sylvain's review comments. Created 6 years 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
OLDNEW
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 CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_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/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" 13 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h"
14 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" 14 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h"
15 #include "components/autofill/core/browser/autofill_client.h" 15 #include "components/autofill/core/browser/autofill_client.h"
16 #include "components/ui/zoom/zoom_observer.h" 16 #include "components/ui/zoom/zoom_observer.h"
17 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
18 #include "content/public/browser/web_contents_user_data.h" 18 #include "content/public/browser/web_contents_user_data.h"
19 19
20 namespace content { 20 namespace content {
21 struct FrameNavigateParams; 21 struct FrameNavigateParams;
22 struct LoadCommittedDetails; 22 struct LoadCommittedDetails;
23 class WebContents; 23 class WebContents;
24 } 24 }
25 25
26 namespace infobars {
27 class InfoBarManager;
28 }
Peter Kasting 2014/12/23 21:20:34 Again, I think we shouldn't need this forward decl
Pritam Nikam 2014/12/24 11:16:57 Done.
29
26 namespace autofill { 30 namespace autofill {
27 31
28 class AutofillDialogController; 32 class AutofillDialogController;
29 class AutofillKeystoneBridgeWrapper; 33 class AutofillKeystoneBridgeWrapper;
30 class AutofillPopupControllerImpl; 34 class AutofillPopupControllerImpl;
31 class CreditCardScannerController; 35 class CreditCardScannerController;
32 struct FormData; 36 struct FormData;
33 37
34 // Chrome implementation of AutofillClient. 38 // Chrome implementation of AutofillClient.
35 class ChromeAutofillClient 39 class ChromeAutofillClient
36 : public AutofillClient, 40 : public AutofillClient,
37 public content::WebContentsUserData<ChromeAutofillClient>, 41 public content::WebContentsUserData<ChromeAutofillClient>,
38 public content::WebContentsObserver, 42 public content::WebContentsObserver,
39 public ui_zoom::ZoomObserver, 43 public ui_zoom::ZoomObserver,
40 public CardUnmaskPromptController { 44 public CardUnmaskPromptController {
41 public: 45 public:
42 ~ChromeAutofillClient() override; 46 ~ChromeAutofillClient() override;
43 47
44 // Called when the tab corresponding to |this| instance is activated. 48 // Called when the tab corresponding to |this| instance is activated.
45 void TabActivated(); 49 void TabActivated();
46 50
47 // AutofillClient: 51 // AutofillClient:
48 PersonalDataManager* GetPersonalDataManager() override; 52 PersonalDataManager* GetPersonalDataManager() override;
49 scoped_refptr<AutofillWebDataService> GetDatabase() override; 53 scoped_refptr<AutofillWebDataService> GetDatabase() override;
50 PrefService* GetPrefs() override; 54 PrefService* GetPrefs() override;
51 void HideRequestAutocompleteDialog() override; 55 void HideRequestAutocompleteDialog() override;
52 void ShowAutofillSettings() override; 56 void ShowAutofillSettings() override;
53 void ShowUnmaskPrompt() override; 57 void ShowUnmaskPrompt() override;
54 void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override;
55 bool HasCreditCardScanFeature() override; 58 bool HasCreditCardScanFeature() override;
56 void ScanCreditCard(const CreditCardScanCallback& callback) override; 59 void ScanCreditCard(const CreditCardScanCallback& callback) override;
57 void ShowRequestAutocompleteDialog(const FormData& form, 60 void ShowRequestAutocompleteDialog(const FormData& form,
58 const GURL& source_url, 61 const GURL& source_url,
59 const ResultCallback& callback) override; 62 const ResultCallback& callback) override;
60 void ShowAutofillPopup( 63 void ShowAutofillPopup(
61 const gfx::RectF& element_bounds, 64 const gfx::RectF& element_bounds,
62 base::i18n::TextDirection text_direction, 65 base::i18n::TextDirection text_direction,
63 const std::vector<autofill::Suggestion>& suggestions, 66 const std::vector<autofill::Suggestion>& suggestions,
64 base::WeakPtr<AutofillPopupDelegate> delegate) override; 67 base::WeakPtr<AutofillPopupDelegate> delegate) override;
65 void UpdateAutofillPopupDataListValues( 68 void UpdateAutofillPopupDataListValues(
66 const std::vector<base::string16>& values, 69 const std::vector<base::string16>& values,
67 const std::vector<base::string16>& labels) override; 70 const std::vector<base::string16>& labels) override;
68 void HideAutofillPopup() override; 71 void HideAutofillPopup() override;
69 bool IsAutocompleteEnabled() override; 72 bool IsAutocompleteEnabled() override;
70 void DetectAccountCreationForms( 73 void DetectAccountCreationForms(
71 content::RenderFrameHost* rfh, 74 content::RenderFrameHost* rfh,
72 const std::vector<autofill::FormStructure*>& forms) override; 75 const std::vector<autofill::FormStructure*>& forms) override;
73 void DidFillOrPreviewField(const base::string16& autofilled_value, 76 void DidFillOrPreviewField(const base::string16& autofilled_value,
74 const base::string16& profile_full_name) override; 77 const base::string16& profile_full_name) override;
75 void OnFirstUserGestureObserved() override; 78 void OnFirstUserGestureObserved() override;
79 infobars::InfoBarManager* GetInfoBarManager() override;
76 80
77 // content::WebContentsObserver implementation. 81 // content::WebContentsObserver implementation.
78 void WebContentsDestroyed() override; 82 void WebContentsDestroyed() override;
79 83
80 // ZoomObserver implementation. 84 // ZoomObserver implementation.
81 void OnZoomChanged( 85 void OnZoomChanged(
82 const ui_zoom::ZoomController::ZoomChangedEventData& data) override; 86 const ui_zoom::ZoomController::ZoomChangedEventData& data) override;
83 87
84 // Exposed for testing. 88 // Exposed for testing.
85 AutofillDialogController* GetDialogControllerForTesting() { 89 AutofillDialogController* GetDialogControllerForTesting() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 CardUnmaskPromptView* card_unmask_view_; 132 CardUnmaskPromptView* card_unmask_view_;
129 133
130 base::WeakPtrFactory<ChromeAutofillClient> weak_pointer_factory_; 134 base::WeakPtrFactory<ChromeAutofillClient> weak_pointer_factory_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); 136 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient);
133 }; 137 };
134 138
135 } // namespace autofill 139 } // namespace autofill
136 140
137 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ 141 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698