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

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

Issue 1396923003: Autofill: Replace "save credit card" infobar with a bubble (Views only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
15 #include "components/autofill/core/browser/autofill_client.h" 16 #include "components/autofill/core/browser/autofill_client.h"
16 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller_impl .h" 17 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller_impl .h"
17 #include "components/ui/zoom/zoom_observer.h" 18 #include "components/ui/zoom/zoom_observer.h"
18 #include "content/public/browser/web_contents_observer.h" 19 #include "content/public/browser/web_contents_observer.h"
19 #include "content/public/browser/web_contents_user_data.h" 20 #include "content/public/browser/web_contents_user_data.h"
20 21
21 namespace content { 22 namespace content {
22 struct FrameNavigateParams; 23 struct FrameNavigateParams;
23 struct LoadCommittedDetails; 24 struct LoadCommittedDetails;
24 class WebContents; 25 class WebContents;
(...skipping 23 matching lines...) Expand all
48 scoped_refptr<AutofillWebDataService> GetDatabase() override; 49 scoped_refptr<AutofillWebDataService> GetDatabase() override;
49 PrefService* GetPrefs() override; 50 PrefService* GetPrefs() override;
50 IdentityProvider* GetIdentityProvider() override; 51 IdentityProvider* GetIdentityProvider() override;
51 rappor::RapporService* GetRapporService() override; 52 rappor::RapporService* GetRapporService() override;
52 void HideRequestAutocompleteDialog() override; 53 void HideRequestAutocompleteDialog() override;
53 void ShowAutofillSettings() override; 54 void ShowAutofillSettings() override;
54 void ShowUnmaskPrompt(const CreditCard& card, 55 void ShowUnmaskPrompt(const CreditCard& card,
55 base::WeakPtr<CardUnmaskDelegate> delegate) override; 56 base::WeakPtr<CardUnmaskDelegate> delegate) override;
56 void OnUnmaskVerificationResult(GetRealPanResult result) override; 57 void OnUnmaskVerificationResult(GetRealPanResult result) override;
57 void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override; 58 void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override;
59 void ShowSaveCreditCardBubble() override;
60 bool WantSaveCreditCardIconVisible() override;
61 bool WantSaveCreditCardIconToggled() override;
58 bool HasCreditCardScanFeature() override; 62 bool HasCreditCardScanFeature() override;
59 void ScanCreditCard(const CreditCardScanCallback& callback) override; 63 void ScanCreditCard(const CreditCardScanCallback& callback) override;
60 void ShowRequestAutocompleteDialog( 64 void ShowRequestAutocompleteDialog(
61 const FormData& form, 65 const FormData& form,
62 content::RenderFrameHost* render_frame_host, 66 content::RenderFrameHost* render_frame_host,
63 const ResultCallback& callback) override; 67 const ResultCallback& callback) override;
64 void ShowAutofillPopup( 68 void ShowAutofillPopup(
65 const gfx::RectF& element_bounds, 69 const gfx::RectF& element_bounds,
66 base::i18n::TextDirection text_direction, 70 base::i18n::TextDirection text_direction,
67 const std::vector<autofill::Suggestion>& suggestions, 71 const std::vector<autofill::Suggestion>& suggestions,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 dialog_controller_ = dialog_controller; 105 dialog_controller_ = dialog_controller;
102 } 106 }
103 107
104 private: 108 private:
105 explicit ChromeAutofillClient(content::WebContents* web_contents); 109 explicit ChromeAutofillClient(content::WebContents* web_contents);
106 friend class content::WebContentsUserData<ChromeAutofillClient>; 110 friend class content::WebContentsUserData<ChromeAutofillClient>;
107 111
108 base::WeakPtr<AutofillDialogController> dialog_controller_; 112 base::WeakPtr<AutofillDialogController> dialog_controller_;
109 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; 113 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_;
110 CardUnmaskPromptControllerImpl unmask_controller_; 114 CardUnmaskPromptControllerImpl unmask_controller_;
115 SaveCardBubbleController save_card_bubble_controller_;
111 116
112 // The last render frame that called requestAutocomplete. 117 // The last render frame that called requestAutocomplete.
113 content::RenderFrameHost* last_rfh_to_rac_; 118 content::RenderFrameHost* last_rfh_to_rac_;
114 119
115 // The identity provider, used for Wallet integration. 120 // The identity provider, used for Wallet integration.
116 scoped_ptr<IdentityProvider> identity_provider_; 121 scoped_ptr<IdentityProvider> identity_provider_;
117 122
118 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); 123 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient);
119 }; 124 };
120 125
121 } // namespace autofill 126 } // namespace autofill
122 127
123 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ 128 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698