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

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

Issue 12094069: [autofill] Hook the sign-in button up to required actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isherman@ review Created 7 years, 10 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_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // AutofillDialogController implementation. 61 // AutofillDialogController implementation.
62 virtual string16 DialogTitle() const OVERRIDE; 62 virtual string16 DialogTitle() const OVERRIDE;
63 virtual string16 EditSuggestionText() const OVERRIDE; 63 virtual string16 EditSuggestionText() const OVERRIDE;
64 virtual string16 UseBillingForShippingText() const OVERRIDE; 64 virtual string16 UseBillingForShippingText() const OVERRIDE;
65 virtual string16 WalletOptionText() const OVERRIDE; 65 virtual string16 WalletOptionText() const OVERRIDE;
66 virtual string16 CancelButtonText() const OVERRIDE; 66 virtual string16 CancelButtonText() const OVERRIDE;
67 virtual string16 ConfirmButtonText() const OVERRIDE; 67 virtual string16 ConfirmButtonText() const OVERRIDE;
68 virtual string16 SignInText() const OVERRIDE; 68 virtual string16 SignInText() const OVERRIDE;
69 virtual string16 SaveLocallyText() const OVERRIDE; 69 virtual string16 SaveLocallyText() const OVERRIDE;
70 virtual string16 CancelSignInText() const OVERRIDE; 70 virtual string16 CancelSignInText() const OVERRIDE;
71 virtual bool IsSignedIn() const OVERRIDE;
72 virtual bool HasReceivedWalletResponse() const OVERRIDE;
71 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) 73 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section)
72 const OVERRIDE; 74 const OVERRIDE;
73 virtual ui::ComboboxModel* ComboboxModelForAutofillType( 75 virtual ui::ComboboxModel* ComboboxModelForAutofillType(
74 AutofillFieldType type) OVERRIDE; 76 AutofillFieldType type) OVERRIDE;
75 virtual ui::MenuModel* MenuModelForSection(DialogSection section) OVERRIDE; 77 virtual ui::MenuModel* MenuModelForSection(DialogSection section) OVERRIDE;
76 virtual string16 LabelForSection(DialogSection section) const OVERRIDE; 78 virtual string16 LabelForSection(DialogSection section) const OVERRIDE;
77 virtual string16 SuggestionTextForSection(DialogSection section) OVERRIDE; 79 virtual string16 SuggestionTextForSection(DialogSection section) OVERRIDE;
78 virtual gfx::Image SuggestionIconForSection(DialogSection section) OVERRIDE; 80 virtual gfx::Image SuggestionIconForSection(DialogSection section) OVERRIDE;
79 virtual void EditClickedForSection(DialogSection section) OVERRIDE; 81 virtual void EditClickedForSection(DialogSection section) OVERRIDE;
80 virtual bool InputIsValid(const DetailInput* input, const string16& value) 82 virtual bool InputIsValid(const DetailInput* input, const string16& value)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 typedef base::Callback<bool(const DetailInput& input, 140 typedef base::Callback<bool(const DetailInput& input,
139 const AutofillField& field)> InputFieldComparator; 141 const AutofillField& field)> InputFieldComparator;
140 142
141 // Whether or not the current request wants credit info back. 143 // Whether or not the current request wants credit info back.
142 bool RequestingCreditCardInfo() const; 144 bool RequestingCreditCardInfo() const;
143 145
144 // Whether the information input in this dialog will be securely transmitted 146 // Whether the information input in this dialog will be securely transmitted
145 // to the requesting site. 147 // to the requesting site.
146 bool TransmissionWillBeSecure() const; 148 bool TransmissionWillBeSecure() const;
147 149
150 // Convenience method to get required actions.
151 std::vector<wallet::RequiredAction> RequiredActions() const;
Ilya Sherman 2013/01/31 04:35:44 nit: Remove dis guy.
Dan Beam 2013/01/31 21:04:26 Done.
152
153 // Convenience method to tell whether we need to address |action|.
154 bool HasRequiredAction(wallet::RequiredAction action) const;
155
148 // Initializes |suggested_email_| et al. 156 // Initializes |suggested_email_| et al.
149 void GenerateSuggestionsModels(); 157 void GenerateSuggestionsModels();
150 158
151 // Returns whether |profile| is complete, i.e. can fill out all the relevant 159 // Returns whether |profile| is complete, i.e. can fill out all the relevant
152 // address info. Incomplete profiles will not be displayed in the dropdown 160 // address info. Incomplete profiles will not be displayed in the dropdown
153 // menu. 161 // menu.
154 bool IsCompleteProfile(const AutofillProfile& profile); 162 bool IsCompleteProfile(const AutofillProfile& profile);
155 163
156 // Fills in |section|-related fields in |output_| according to the state of 164 // Fills in |section|-related fields in |output_| according to the state of
157 // |view_|. 165 // |view_|.
(...skipping 27 matching lines...) Expand all
185 std::vector<string16>* popup_values, 193 std::vector<string16>* popup_values,
186 std::vector<string16>* popup_labels, 194 std::vector<string16>* popup_labels,
187 std::vector<string16>* popup_icons); 195 std::vector<string16>* popup_icons);
188 196
189 // Returns the PersonalDataManager for |profile_|. 197 // Returns the PersonalDataManager for |profile_|.
190 PersonalDataManager* GetManager(); 198 PersonalDataManager* GetManager();
191 199
192 // Like RequestedFieldsForSection, but returns a pointer. 200 // Like RequestedFieldsForSection, but returns a pointer.
193 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); 201 DetailInputs* MutableRequestedFieldsForSection(DialogSection section);
194 202
195 // Turns a required action into a notification.
196 DialogNotification RequiredActionNotification(
197 const std::vector<wallet::RequiredAction>& required_actions) const;
198
199 // Hides |popup_controller_|'s popup view, if it exists. 203 // Hides |popup_controller_|'s popup view, if it exists.
200 void HidePopup(); 204 void HidePopup();
201 205
202 // The |profile| for |contents_|. 206 // The |profile| for |contents_|.
203 Profile* const profile_; 207 Profile* const profile_;
204 208
205 // The WebContents where the Autofill action originated. 209 // The WebContents where the Autofill action originated.
206 content::WebContents* const contents_; 210 content::WebContents* const contents_;
207 211
208 FormStructure form_structure_; 212 FormStructure form_structure_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 265
262 // A NotificationRegistrar for tracking the completion of sign-in. 266 // A NotificationRegistrar for tracking the completion of sign-in.
263 content::NotificationRegistrar registrar_; 267 content::NotificationRegistrar registrar_;
264 268
265 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 269 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
266 }; 270 };
267 271
268 } // namespace autofill 272 } // namespace autofill
269 273
270 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 274 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698