| 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_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 views::View* CreateMainContainer(); | 497 views::View* CreateMainContainer(); |
| 498 | 498 |
| 499 // Creates a detail section (Shipping, Email, etc.) with the given label, | 499 // Creates a detail section (Shipping, Email, etc.) with the given label, |
| 500 // inputs View, and suggestion model. Relevant pointers are stored in |group|. | 500 // inputs View, and suggestion model. Relevant pointers are stored in |group|. |
| 501 void CreateDetailsSection(DialogSection section); | 501 void CreateDetailsSection(DialogSection section); |
| 502 | 502 |
| 503 // Creates the view that holds controls for inputing or selecting data for | 503 // Creates the view that holds controls for inputing or selecting data for |
| 504 // a given section. | 504 // a given section. |
| 505 views::View* CreateInputsContainer(DialogSection section); | 505 views::View* CreateInputsContainer(DialogSection section); |
| 506 | 506 |
| 507 // Creates a grid of textfield views for the given section, and stores them | 507 // Creates a grid of inputs for the given section. |
| 508 // in the appropriate DetailsGroup. The top level View in the hierarchy is | 508 void InitInputsView(DialogSection section); |
| 509 // returned. | |
| 510 views::View* InitInputsView(DialogSection section); | |
| 511 | 509 |
| 512 // Changes the function of the whole dialog. Currently this can show a loading | 510 // Changes the function of the whole dialog. Currently this can show a loading |
| 513 // shield, an embedded sign in web view, or the more typical detail input mode | 511 // shield, an embedded sign in web view, or the more typical detail input mode |
| 514 // (suggestions and form inputs). | 512 // (suggestions and form inputs). |
| 515 void ShowDialogInMode(DialogMode dialog_mode); | 513 void ShowDialogInMode(DialogMode dialog_mode); |
| 516 | 514 |
| 517 // Updates the given section to match the state provided by |delegate_|. If | 515 // Updates the given section to match the state provided by |delegate_|. If |
| 518 // |clobber_inputs| is true, the current state of the textfields will be | 516 // |clobber_inputs| is true, the current state of the textfields will be |
| 519 // ignored, otherwise their contents will be preserved. | 517 // ignored, otherwise their contents will be preserved. |
| 520 void UpdateSectionImpl(DialogSection section, bool clobber_inputs); | 518 void UpdateSectionImpl(DialogSection section, bool clobber_inputs); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 void DoContentsPreferredSizeChanged(); | 572 void DoContentsPreferredSizeChanged(); |
| 575 | 573 |
| 576 // Gets the textfield view that is shown for the given DetailInput model, or | 574 // Gets the textfield view that is shown for the given DetailInput model, or |
| 577 // NULL. | 575 // NULL. |
| 578 views::Textfield* TextfieldForInput(const DetailInput& input); | 576 views::Textfield* TextfieldForInput(const DetailInput& input); |
| 579 | 577 |
| 580 // Gets the combobox view that is shown for the given DetailInput model, or | 578 // Gets the combobox view that is shown for the given DetailInput model, or |
| 581 // NULL. | 579 // NULL. |
| 582 views::Combobox* ComboboxForInput(const DetailInput& input); | 580 views::Combobox* ComboboxForInput(const DetailInput& input); |
| 583 | 581 |
| 582 // Returns the associated ServerFieldType for |combobox|. |
| 583 ServerFieldType TypeForCombobox(const views::Combobox* combobox) const; |
| 584 |
| 584 // Called when the details container changes in size or position. | 585 // Called when the details container changes in size or position. |
| 585 void DetailsContainerBoundsChanged(); | 586 void DetailsContainerBoundsChanged(); |
| 586 | 587 |
| 587 // Sets the icons in |section| according to the field values. For example, | 588 // Sets the icons in |section| according to the field values. For example, |
| 588 // sets the credit card and CVC icons according to the credit card number. | 589 // sets the credit card and CVC icons according to the credit card number. |
| 589 void SetIconsForSection(DialogSection section); | 590 void SetIconsForSection(DialogSection section); |
| 590 | 591 |
| 591 // Iterates over all the inputs in |section| and sets their enabled/disabled | 592 // Iterates over all the inputs in |section| and sets their enabled/disabled |
| 592 // state. | 593 // state. |
| 593 void SetEditabilityForSection(DialogSection section); | 594 void SetEditabilityForSection(DialogSection section); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 | 679 |
| 679 // Delegate for the sign-in dialog's webview. | 680 // Delegate for the sign-in dialog's webview. |
| 680 scoped_ptr<AutofillDialogSignInDelegate> sign_in_delegate_; | 681 scoped_ptr<AutofillDialogSignInDelegate> sign_in_delegate_; |
| 681 | 682 |
| 682 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 683 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 683 }; | 684 }; |
| 684 | 685 |
| 685 } // namespace autofill | 686 } // namespace autofill |
| 686 | 687 |
| 687 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 688 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| OLD | NEW |