OLD | NEW |
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 401 |
402 // Finds all fields of the given |type| in |form_structure_|, if any, and sets | 402 // Finds all fields of the given |type| in |form_structure_|, if any, and sets |
403 // each field's value to |output|. | 403 // each field's value to |output|. |
404 void SetOutputForFieldsOfType(ServerFieldType type, const string16& output); | 404 void SetOutputForFieldsOfType(ServerFieldType type, const string16& output); |
405 | 405 |
406 // Gets the value for |type| in |section|, whether it comes from manual user | 406 // Gets the value for |type| in |section|, whether it comes from manual user |
407 // input or the active suggestion. | 407 // input or the active suggestion. |
408 string16 GetValueFromSection(DialogSection section, | 408 string16 GetValueFromSection(DialogSection section, |
409 ServerFieldType type); | 409 ServerFieldType type); |
410 | 410 |
411 // Saves the data in |profile| to the personal data manager. This may add | |
412 // a new profile or tack onto an existing profile. | |
413 void SaveProfileGleanedFromSection(const AutofillProfile& profile, | |
414 DialogSection section); | |
415 | |
416 // Gets the SuggestionsMenuModel for |section|. | 411 // Gets the SuggestionsMenuModel for |section|. |
417 SuggestionsMenuModel* SuggestionsMenuModelForSection(DialogSection section); | 412 SuggestionsMenuModel* SuggestionsMenuModelForSection(DialogSection section); |
418 const SuggestionsMenuModel* SuggestionsMenuModelForSection( | 413 const SuggestionsMenuModel* SuggestionsMenuModelForSection( |
419 DialogSection section) const; | 414 DialogSection section) const; |
420 // And the reverse. | 415 // And the reverse. |
421 DialogSection SectionForSuggestionsMenuModel( | 416 DialogSection SectionForSuggestionsMenuModel( |
422 const SuggestionsMenuModel& model); | 417 const SuggestionsMenuModel& model); |
423 | 418 |
424 // Suggested text and icons for sections. Suggestion text is used to show an | 419 // Suggested text and icons for sections. Suggestion text is used to show an |
425 // abridged overview of the currently used suggestion. Extra text is used when | 420 // abridged overview of the currently used suggestion. Extra text is used when |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // The notification that describes the current wallet error, if any. | 701 // The notification that describes the current wallet error, if any. |
707 scoped_ptr<DialogNotification> wallet_error_notification_; | 702 scoped_ptr<DialogNotification> wallet_error_notification_; |
708 | 703 |
709 // Whether the latency to display to the UI was logged to UMA yet. | 704 // Whether the latency to display to the UI was logged to UMA yet. |
710 bool was_ui_latency_logged_; | 705 bool was_ui_latency_logged_; |
711 | 706 |
712 // The Google Wallet cookie value, set as an authorization header on requests | 707 // The Google Wallet cookie value, set as an authorization header on requests |
713 // to Wallet. | 708 // to Wallet. |
714 std::string wallet_cookie_value_; | 709 std::string wallet_cookie_value_; |
715 | 710 |
| 711 // The GUIDs of newly saved Autofill data models, or empty strings if there |
| 712 // were no newly saved data models. |
| 713 std::string newly_saved_billing_profile_guid_; |
| 714 std::string newly_saved_shipping_profile_guid_; |
| 715 std::string newly_saved_card_guid_; |
| 716 |
716 // Populated if the user chose to save a newly inputted credit card. Used to | 717 // Populated if the user chose to save a newly inputted credit card. Used to |
717 // show a bubble as the dialog closes to confirm a user's new card info was | 718 // show a bubble as the dialog closes to confirm a user's new card info was |
718 // saved. Never populated while incognito (as nothing's actually saved). | 719 // saved. Never populated while incognito (as nothing's actually saved). |
719 scoped_ptr<CreditCard> newly_saved_card_; | 720 scoped_ptr<CreditCard> newly_saved_card_; |
720 | 721 |
721 // The timer that delays enabling submit button for a short period of time on | 722 // The timer that delays enabling submit button for a short period of time on |
722 // startup. | 723 // startup. |
723 base::OneShotTimer<AutofillDialogControllerImpl> submit_button_delay_timer_; | 724 base::OneShotTimer<AutofillDialogControllerImpl> submit_button_delay_timer_; |
724 | 725 |
725 // The card scrambling animation displays a random number in place of an | 726 // The card scrambling animation displays a random number in place of an |
(...skipping 12 matching lines...) Expand all Loading... |
738 | 739 |
739 // A username string we display in the card scrambling/generated overlay. | 740 // A username string we display in the card scrambling/generated overlay. |
740 base::string16 submitted_cardholder_name_; | 741 base::string16 submitted_cardholder_name_; |
741 | 742 |
742 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 743 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
743 }; | 744 }; |
744 | 745 |
745 } // namespace autofill | 746 } // namespace autofill |
746 | 747 |
747 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 748 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |