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

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

Issue 14129005: Remove "Use billing for shipping" checkbox in favor of item in suggestions menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dbeam review Created 7 years, 8 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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void UpdateProgressBar(double value); 88 void UpdateProgressBar(double value);
89 89
90 // Called when there is an error in an active Autocheckout flow. 90 // Called when there is an error in an active Autocheckout flow.
91 void OnAutocheckoutError(); 91 void OnAutocheckoutError();
92 92
93 // AutofillDialogController implementation. 93 // AutofillDialogController implementation.
94 virtual string16 DialogTitle() const OVERRIDE; 94 virtual string16 DialogTitle() const OVERRIDE;
95 virtual string16 AccountChooserText() const OVERRIDE; 95 virtual string16 AccountChooserText() const OVERRIDE;
96 virtual string16 SignInLinkText() const OVERRIDE; 96 virtual string16 SignInLinkText() const OVERRIDE;
97 virtual string16 EditSuggestionText() const OVERRIDE; 97 virtual string16 EditSuggestionText() const OVERRIDE;
98 virtual string16 UseBillingForShippingText() const OVERRIDE;
99 virtual string16 CancelButtonText() const OVERRIDE; 98 virtual string16 CancelButtonText() const OVERRIDE;
100 virtual string16 ConfirmButtonText() const OVERRIDE; 99 virtual string16 ConfirmButtonText() const OVERRIDE;
101 virtual string16 SaveLocallyText() const OVERRIDE; 100 virtual string16 SaveLocallyText() const OVERRIDE;
102 virtual string16 CancelSignInText() const OVERRIDE; 101 virtual string16 CancelSignInText() const OVERRIDE;
103 virtual string16 ProgressBarText() const OVERRIDE; 102 virtual string16 ProgressBarText() const OVERRIDE;
104 virtual string16 LegalDocumentsText() OVERRIDE; 103 virtual string16 LegalDocumentsText() OVERRIDE;
105 virtual DialogSignedInState SignedInState() const OVERRIDE; 104 virtual DialogSignedInState SignedInState() const OVERRIDE;
106 virtual bool ShouldShowSpinner() const OVERRIDE; 105 virtual bool ShouldShowSpinner() const OVERRIDE;
107 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE; 106 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE;
108 virtual ui::MenuModel* MenuModelForAccountChooser() OVERRIDE; 107 virtual ui::MenuModel* MenuModelForAccountChooser() OVERRIDE;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 virtual void RemoveSuggestion(const string16& value, 157 virtual void RemoveSuggestion(const string16& value,
159 int identifier) OVERRIDE; 158 int identifier) OVERRIDE;
160 virtual void ClearPreviewedForm() OVERRIDE; 159 virtual void ClearPreviewedForm() OVERRIDE;
161 160
162 // content::NotificationObserver implementation. 161 // content::NotificationObserver implementation.
163 virtual void Observe(int type, 162 virtual void Observe(int type,
164 const content::NotificationSource& source, 163 const content::NotificationSource& source,
165 const content::NotificationDetails& details) OVERRIDE; 164 const content::NotificationDetails& details) OVERRIDE;
166 165
167 // SuggestionsMenuModelDelegate implementation. 166 // SuggestionsMenuModelDelegate implementation.
168 virtual void SuggestionItemSelected(const SuggestionsMenuModel& model) 167 virtual void SuggestionItemSelected(SuggestionsMenuModel* model,
169 OVERRIDE; 168 const std::string& item_key) OVERRIDE;
170 169
171 // wallet::WalletClientDelegate implementation. 170 // wallet::WalletClientDelegate implementation.
172 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE; 171 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE;
173 virtual DialogType GetDialogType() const OVERRIDE; 172 virtual DialogType GetDialogType() const OVERRIDE;
174 virtual std::string GetRiskData() const OVERRIDE; 173 virtual std::string GetRiskData() const OVERRIDE;
175 virtual void OnDidAcceptLegalDocuments() OVERRIDE; 174 virtual void OnDidAcceptLegalDocuments() OVERRIDE;
176 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE; 175 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE;
177 virtual void OnDidGetFullWallet( 176 virtual void OnDidGetFullWallet(
178 scoped_ptr<wallet::FullWallet> full_wallet) OVERRIDE; 177 scoped_ptr<wallet::FullWallet> full_wallet) OVERRIDE;
179 virtual void OnDidGetWalletItems( 178 virtual void OnDidGetWalletItems(
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 DialogSection section) const; 315 DialogSection section) const;
317 // And the reverse. 316 // And the reverse.
318 DialogSection SectionForSuggestionsMenuModel( 317 DialogSection SectionForSuggestionsMenuModel(
319 const SuggestionsMenuModel& model); 318 const SuggestionsMenuModel& model);
320 319
321 // Suggested text and icons for sections. Suggestion text is used to show an 320 // Suggested text and icons for sections. Suggestion text is used to show an
322 // abidged overview of the currently used suggestion. Extra text is used when 321 // abidged overview of the currently used suggestion. Extra text is used when
323 // part of a section is suggested but part must be manually input (e.g. during 322 // part of a section is suggested but part must be manually input (e.g. during
324 // a CVC challenge or when using Autofill's CC section [never stores CVC]). 323 // a CVC challenge or when using Autofill's CC section [never stores CVC]).
325 string16 SuggestionTextForSection(DialogSection section); 324 string16 SuggestionTextForSection(DialogSection section);
325 gfx::Font::FontStyle SuggestionTextStyleForSection(DialogSection section)
326 const;
326 string16 RequiredActionTextForSection(DialogSection section) const; 327 string16 RequiredActionTextForSection(DialogSection section) const;
327 gfx::Image SuggestionIconForSection(DialogSection section); 328 gfx::Image SuggestionIconForSection(DialogSection section);
328 string16 ExtraSuggestionTextForSection(DialogSection section) const; 329 string16 ExtraSuggestionTextForSection(DialogSection section) const;
329 gfx::Image ExtraSuggestionIconForSection(DialogSection section) const; 330 gfx::Image ExtraSuggestionIconForSection(DialogSection section) const;
330 331
331 // Whether |section| should be showing an "Edit" link. 332 // Whether |section| should be showing an "Edit" link.
332 bool EditEnabledForSection(DialogSection section) const; 333 bool EditEnabledForSection(DialogSection section) const;
333 334
334 // Loads profiles that can suggest data for |type|. |field_contents| is the 335 // Loads profiles that can suggest data for |type|. |field_contents| is the
335 // part the user has already typed. |inputs| is the rest of section. 336 // part the user has already typed. |inputs| is the rest of section.
(...skipping 26 matching lines...) Expand all
362 bool IsManuallyEditingAnySection() const; 363 bool IsManuallyEditingAnySection() const;
363 364
364 // Whether all of the input fields currently showing in the dialog have valid 365 // Whether all of the input fields currently showing in the dialog have valid
365 // contents. 366 // contents.
366 bool AllSectionsAreValid() const; 367 bool AllSectionsAreValid() const;
367 368
368 // Whether all of the input fields currently showing in the given |section| of 369 // Whether all of the input fields currently showing in the given |section| of
369 // the dialog have valid contents. 370 // the dialog have valid contents.
370 bool SectionIsValid(DialogSection section) const; 371 bool SectionIsValid(DialogSection section) const;
371 372
373 // Returns true if |key| refers to a suggestion, as opposed to some control
374 // menu item.
375 bool IsASuggestionItemKey(const std::string& key);
376
372 // Whether the billing section should be used to fill in the shipping details. 377 // Whether the billing section should be used to fill in the shipping details.
373 bool ShouldUseBillingForShipping(); 378 bool ShouldUseBillingForShipping();
374 379
375 // Whether the user wishes to save information locally to Autofill. 380 // Whether the user wishes to save information locally to Autofill.
376 bool ShouldSaveDetailsLocally(); 381 bool ShouldSaveDetailsLocally();
377 382
378 // Change whether the controller is currently submitting details to Autofill 383 // Change whether the controller is currently submitting details to Autofill
379 // or Online Wallet (|is_submitting_|) and update the view. 384 // or Online Wallet (|is_submitting_|) and update the view.
380 void SetIsSubmitting(bool submitting); 385 void SetIsSubmitting(bool submitting);
381 386
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 532
528 // Whether or not there was an error in the Autocheckout flow. 533 // Whether or not there was an error in the Autocheckout flow.
529 bool had_autocheckout_error_; 534 bool had_autocheckout_error_;
530 535
531 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 536 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
532 }; 537 };
533 538
534 } // namespace autofill 539 } // namespace autofill
535 540
536 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 541 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698