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

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

Issue 23579009: [rAc] Move email address into billing address section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include email address in suggestion preview text, fix some compile errors (unittests need more fixi… 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_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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // Shows a new credit card saved bubble and passes ownership of |new_card| and 279 // Shows a new credit card saved bubble and passes ownership of |new_card| and
280 // |billing_profile| to the bubble. Exposed for testing. 280 // |billing_profile| to the bubble. Exposed for testing.
281 virtual void ShowNewCreditCardBubble( 281 virtual void ShowNewCreditCardBubble(
282 scoped_ptr<CreditCard> new_card, 282 scoped_ptr<CreditCard> new_card,
283 scoped_ptr<AutofillProfile> billing_profile); 283 scoped_ptr<AutofillProfile> billing_profile);
284 284
285 private: 285 private:
286 // Whether or not the current request wants credit info back. 286 // Whether or not the current request wants credit info back.
287 bool RequestingCreditCardInfo() const; 287 bool RequestingCreditCardInfo() const;
288 288
289 // Initializes or updates |suggested_email_| et al. 289 // Initializes or updates |suggested_cc_| et al.
290 void SuggestionsUpdated(); 290 void SuggestionsUpdated();
291 291
292 // Whether the user's wallet items have at least one address and instrument. 292 // Whether the user's wallet items have at least one address and instrument.
293 bool HasCompleteWallet() const; 293 bool HasCompleteWallet() const;
294 294
295 // Starts fetching the wallet items from Online Wallet. 295 // Starts fetching the wallet items from Online Wallet.
296 void GetWalletItems(); 296 void GetWalletItems();
297 297
298 // Stop showing sign in flow. 298 // Stop showing sign in flow.
299 void HideSignIn(); 299 void HideSignIn();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 void FillOutputForSection(DialogSection section); 356 void FillOutputForSection(DialogSection section);
357 // As above, but uses |compare| to determine whether a DetailInput matches 357 // As above, but uses |compare| to determine whether a DetailInput matches
358 // a field. Saves any new Autofill data to the PersonalDataManager. 358 // a field. Saves any new Autofill data to the PersonalDataManager.
359 void FillOutputForSectionWithComparator(DialogSection section, 359 void FillOutputForSectionWithComparator(DialogSection section,
360 const InputFieldComparator& compare); 360 const InputFieldComparator& compare);
361 361
362 // Returns whether |form_structure|_| has any fields that match the fieldset 362 // Returns whether |form_structure|_| has any fields that match the fieldset
363 // represented by |section|. 363 // represented by |section|.
364 bool FormStructureCaresAboutSection(DialogSection section) const; 364 bool FormStructureCaresAboutSection(DialogSection section) const;
365 365
366 // Sets the CVC result on |form_structure_| to the value in |cvc|. 366 // Finds all fields of the given |type| in |form_structure_|, if any, and sets
367 void SetCvcResult(const string16& cvc); 367 // each field's value to |output|.
368 void SetOutputForFieldsOfType(ServerFieldType type, const string16& output);
368 369
369 // Gets the value for |type| in |section|, whether it comes from manual user 370 // Gets the value for |type| in |section|, whether it comes from manual user
370 // input or the active suggestion. 371 // input or the active suggestion.
371 string16 GetValueFromSection(DialogSection section, 372 string16 GetValueFromSection(DialogSection section,
372 ServerFieldType type); 373 ServerFieldType type);
373 374
374 // Saves the data in |profile| to the personal data manager. This may add 375 // Saves the data in |profile| to the personal data manager. This may add
375 // a new profile or tack onto an existing profile. 376 // a new profile or tack onto an existing profile.
376 void SaveProfileGleanedFromSection(const AutofillProfile& profile, 377 void SaveProfileGleanedFromSection(const AutofillProfile& profile,
377 DialogSection section); 378 DialogSection section);
378 379
379 // Gets the SuggestionsMenuModel for |section|. 380 // Gets the SuggestionsMenuModel for |section|.
380 SuggestionsMenuModel* SuggestionsMenuModelForSection(DialogSection section); 381 SuggestionsMenuModel* SuggestionsMenuModelForSection(DialogSection section);
381 const SuggestionsMenuModel* SuggestionsMenuModelForSection( 382 const SuggestionsMenuModel* SuggestionsMenuModelForSection(
382 DialogSection section) const; 383 DialogSection section) const;
383 // And the reverse. 384 // And the reverse.
384 DialogSection SectionForSuggestionsMenuModel( 385 DialogSection SectionForSuggestionsMenuModel(
385 const SuggestionsMenuModel& model); 386 const SuggestionsMenuModel& model);
386 387
387 // Suggested text and icons for sections. Suggestion text is used to show an 388 // Suggested text and icons for sections. Suggestion text is used to show an
388 // abidged overview of the currently used suggestion. Extra text is used when 389 // abridged overview of the currently used suggestion. Extra text is used when
389 // part of a section is suggested but part must be manually input (e.g. during 390 // part of a section is suggested but part must be manually input (e.g. during
390 // a CVC challenge or when using Autofill's CC section [never stores CVC]). 391 // a CVC challenge or when using Autofill's CC section [never stores CVC]).
391 bool SuggestionTextForSection(DialogSection section, 392 bool SuggestionTextForSection(DialogSection section,
392 base::string16* vertically_compact, 393 base::string16* vertically_compact,
393 base::string16* horizontally_compact); 394 base::string16* horizontally_compact);
394 string16 RequiredActionTextForSection(DialogSection section) const; 395 string16 RequiredActionTextForSection(DialogSection section) const;
395 gfx::Image SuggestionIconForSection(DialogSection section); 396 gfx::Image SuggestionIconForSection(DialogSection section);
396 string16 ExtraSuggestionTextForSection(DialogSection section) const; 397 string16 ExtraSuggestionTextForSection(DialogSection section) const;
397 gfx::Image ExtraSuggestionIconForSection(DialogSection section) const; 398 gfx::Image ExtraSuggestionIconForSection(DialogSection section) const;
398 399
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 string16 legal_documents_text_; 588 string16 legal_documents_text_;
588 // The ranges within |legal_documents_text_| to linkify. 589 // The ranges within |legal_documents_text_| to linkify.
589 std::vector<ui::Range> legal_document_link_ranges_; 590 std::vector<ui::Range> legal_document_link_ranges_;
590 591
591 // The instrument and address IDs from the Online Wallet server to be used 592 // The instrument and address IDs from the Online Wallet server to be used
592 // when getting a full wallet. 593 // when getting a full wallet.
593 std::string active_instrument_id_; 594 std::string active_instrument_id_;
594 std::string active_address_id_; 595 std::string active_address_id_;
595 596
596 // The fields for billing and shipping which the page has actually requested. 597 // The fields for billing and shipping which the page has actually requested.
597 DetailInputs requested_email_fields_;
598 DetailInputs requested_cc_fields_; 598 DetailInputs requested_cc_fields_;
599 DetailInputs requested_billing_fields_; 599 DetailInputs requested_billing_fields_;
600 DetailInputs requested_cc_billing_fields_; 600 DetailInputs requested_cc_billing_fields_;
601 DetailInputs requested_shipping_fields_; 601 DetailInputs requested_shipping_fields_;
602 602
603 // Models for the credit card expiration inputs. 603 // Models for the credit card expiration inputs.
604 MonthComboboxModel cc_exp_month_combobox_model_; 604 MonthComboboxModel cc_exp_month_combobox_model_;
605 YearComboboxModel cc_exp_year_combobox_model_; 605 YearComboboxModel cc_exp_year_combobox_model_;
606 606
607 // Model for the country input. 607 // Model for the country input.
608 CountryComboboxModel country_combobox_model_; 608 CountryComboboxModel country_combobox_model_;
609 609
610 // Models for the suggestion views. 610 // Models for the suggestion views.
611 SuggestionsMenuModel suggested_email_;
612 SuggestionsMenuModel suggested_cc_; 611 SuggestionsMenuModel suggested_cc_;
613 SuggestionsMenuModel suggested_billing_; 612 SuggestionsMenuModel suggested_billing_;
614 SuggestionsMenuModel suggested_cc_billing_; 613 SuggestionsMenuModel suggested_cc_billing_;
615 SuggestionsMenuModel suggested_shipping_; 614 SuggestionsMenuModel suggested_shipping_;
616 615
617 // |DialogSection|s that are in edit mode that are based on existing data. 616 // |DialogSection|s that are in edit mode that are based on existing data.
618 std::set<DialogSection> section_editing_state_; 617 std::set<DialogSection> section_editing_state_;
619 618
620 // Whether |form_structure_| has asked for any details that would indicate 619 // Whether |form_structure_| has asked for any details that would indicate
621 // we should show a shipping section. 620 // we should show a shipping section.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // show a bubble as the dialog closes to confirm a user's new card info was 683 // show a bubble as the dialog closes to confirm a user's new card info was
685 // saved. Never populated while incognito (as nothing's actually saved). 684 // saved. Never populated while incognito (as nothing's actually saved).
686 scoped_ptr<CreditCard> newly_saved_card_; 685 scoped_ptr<CreditCard> newly_saved_card_;
687 686
688 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 687 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
689 }; 688 };
690 689
691 } // namespace autofill 690 } // namespace autofill
692 691
693 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 692 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698