| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // isn't using Wallet or the user is adding a new instrument or address, NULL | 394 // isn't using Wallet or the user is adding a new instrument or address, NULL |
| 395 // will be returned. | 395 // will be returned. |
| 396 const wallet::WalletItems::MaskedInstrument* ActiveInstrument() const; | 396 const wallet::WalletItems::MaskedInstrument* ActiveInstrument() const; |
| 397 const wallet::Address* ActiveShippingAddress() const; | 397 const wallet::Address* ActiveShippingAddress() const; |
| 398 | 398 |
| 399 // Fills in |section|-related fields in |output_| according to the state of | 399 // Fills in |section|-related fields in |output_| according to the state of |
| 400 // |view_|. | 400 // |view_|. |
| 401 void FillOutputForSection(DialogSection section); | 401 void FillOutputForSection(DialogSection section); |
| 402 // As above, but uses |compare| to determine whether a DetailInput matches | 402 // As above, but uses |compare| to determine whether a DetailInput matches |
| 403 // a field. Saves any new Autofill data to the PersonalDataManager. | 403 // a field. Saves any new Autofill data to the PersonalDataManager. |
| 404 void FillOutputForSectionWithComparator(DialogSection section, | 404 void FillOutputForSectionWithComparator( |
| 405 const InputFieldComparator& compare); | 405 DialogSection section, |
| 406 const FormStructure::InputFieldComparator& compare); |
| 406 | 407 |
| 407 // Returns whether |form_structure|_| has any fields that match the fieldset | 408 // Returns whether |form_structure|_| has any fields that match the fieldset |
| 408 // represented by |section|. | 409 // represented by |section|. |
| 409 bool FormStructureCaresAboutSection(DialogSection section) const; | 410 bool FormStructureCaresAboutSection(DialogSection section) const; |
| 410 | 411 |
| 411 // Finds all fields of the given |type| in |form_structure_|, if any, and sets | 412 // Finds all fields of the given |type| in |form_structure_|, if any, and sets |
| 412 // each field's value to |output|. | 413 // each field's value to |output|. |
| 413 void SetOutputForFieldsOfType(ServerFieldType type, | 414 void SetOutputForFieldsOfType(ServerFieldType type, |
| 414 const base::string16& output); | 415 const base::string16& output); |
| 415 | 416 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 ServerFieldType type, | 455 ServerFieldType type, |
| 455 const base::string16& field_contents, | 456 const base::string16& field_contents, |
| 456 const DetailInputs& inputs, | 457 const DetailInputs& inputs, |
| 457 std::vector<base::string16>* popup_values, | 458 std::vector<base::string16>* popup_values, |
| 458 std::vector<base::string16>* popup_labels, | 459 std::vector<base::string16>* popup_labels, |
| 459 std::vector<base::string16>* popup_icons); | 460 std::vector<base::string16>* popup_icons); |
| 460 | 461 |
| 461 // Like RequestedFieldsForSection, but returns a pointer. | 462 // Like RequestedFieldsForSection, but returns a pointer. |
| 462 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 463 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 463 | 464 |
| 465 // Returns just the |type| attributes of RequestedFieldsForSection(section). |
| 466 std::vector<ServerFieldType> RequestedTypesForSection(DialogSection section) |
| 467 const; |
| 468 |
| 464 // Returns the country code (e.g. "US") for |section|. | 469 // Returns the country code (e.g. "US") for |section|. |
| 465 std::string CountryCodeForSection(DialogSection section); | 470 std::string CountryCodeForSection(DialogSection section); |
| 466 | 471 |
| 467 // Hides |popup_controller_|'s popup view, if it exists. | 472 // Hides |popup_controller_|'s popup view, if it exists. |
| 468 void HidePopup(); | 473 void HidePopup(); |
| 469 | 474 |
| 470 // Set whether the currently editing |section| was originally based on | 475 // Set whether the currently editing |section| was originally based on |
| 471 // existing Wallet or Autofill data. | 476 // existing Wallet or Autofill data. |
| 472 void SetEditingExistingData(DialogSection section, bool editing); | 477 void SetEditingExistingData(DialogSection section, bool editing); |
| 473 | 478 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 | 778 |
| 774 // A username string we display in the card scrambling/generated overlay. | 779 // A username string we display in the card scrambling/generated overlay. |
| 775 base::string16 submitted_cardholder_name_; | 780 base::string16 submitted_cardholder_name_; |
| 776 | 781 |
| 777 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 782 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 778 }; | 783 }; |
| 779 | 784 |
| 780 } // namespace autofill | 785 } // namespace autofill |
| 781 | 786 |
| 782 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 787 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |