| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 virtual void OnSignInResize(const gfx::Size& pref_size) OVERRIDE; | 97 virtual void OnSignInResize(const gfx::Size& pref_size) OVERRIDE; |
| 98 virtual void ValidateSection(DialogSection section) OVERRIDE; | 98 virtual void ValidateSection(DialogSection section) OVERRIDE; |
| 99 | 99 |
| 100 // views::View implementation. | 100 // views::View implementation. |
| 101 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 101 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 102 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 102 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
| 103 virtual void Layout() OVERRIDE; | 103 virtual void Layout() OVERRIDE; |
| 104 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 104 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
| 105 | 105 |
| 106 // views::DialogDelegate implementation: | 106 // views::DialogDelegate implementation: |
| 107 virtual ui::ModalType GetModalType() const OVERRIDE; |
| 107 virtual base::string16 GetWindowTitle() const OVERRIDE; | 108 virtual base::string16 GetWindowTitle() const OVERRIDE; |
| 108 virtual void WindowClosing() OVERRIDE; | 109 virtual void WindowClosing() OVERRIDE; |
| 109 virtual void DeleteDelegate() OVERRIDE; | 110 virtual void DeleteDelegate() OVERRIDE; |
| 110 virtual views::View* CreateOverlayView() OVERRIDE; | 111 virtual views::View* CreateOverlayView() OVERRIDE; |
| 111 virtual int GetDialogButtons() const OVERRIDE; | 112 virtual int GetDialogButtons() const OVERRIDE; |
| 112 virtual int GetDefaultDialogButton() const OVERRIDE; | 113 virtual int GetDefaultDialogButton() const OVERRIDE; |
| 113 virtual base::string16 GetDialogButtonLabel(ui::DialogButton button) const | 114 virtual base::string16 GetDialogButtonLabel(ui::DialogButton button) const |
| 114 OVERRIDE; | 115 OVERRIDE; |
| 115 virtual bool ShouldDefaultButtonBeBlue() const OVERRIDE; | 116 virtual bool ShouldDefaultButtonBeBlue() const OVERRIDE; |
| 116 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; | 117 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // focused), this function will inform the delegate to take the appropriate | 552 // focused), this function will inform the delegate to take the appropriate |
| 552 // action (textfields may show a suggestion popup, comboboxes may rebuild the | 553 // action (textfields may show a suggestion popup, comboboxes may rebuild the |
| 553 // section inputs). May also reset the validity state of the input. | 554 // section inputs). May also reset the validity state of the input. |
| 554 void InputEditedOrActivated(ServerFieldType type, | 555 void InputEditedOrActivated(ServerFieldType type, |
| 555 const gfx::Rect& bounds, | 556 const gfx::Rect& bounds, |
| 556 bool was_edit); | 557 bool was_edit); |
| 557 | 558 |
| 558 // Updates the views in the button strip. | 559 // Updates the views in the button strip. |
| 559 void UpdateButtonStripExtraView(); | 560 void UpdateButtonStripExtraView(); |
| 560 | 561 |
| 561 // Call this when the size of anything in |contents_| might've changed. | 562 // Call this when the size of anything in the contents might have changed. |
| 562 void ContentsPreferredSizeChanged(); | 563 void ContentsPreferredSizeChanged(); |
| 563 void DoContentsPreferredSizeChanged(); | 564 void DoContentsPreferredSizeChanged(); |
| 564 | 565 |
| 565 // Gets the textfield view that is shown for the given |type| or NULL. | 566 // Gets the textfield view that is shown for the given |type| or NULL. |
| 566 ExpandingTextfield* TextfieldForType(ServerFieldType type); | 567 ExpandingTextfield* TextfieldForType(ServerFieldType type); |
| 567 | 568 |
| 568 // Returns the associated ServerFieldType for |textfield|. | 569 // Returns the associated ServerFieldType for |textfield|. |
| 569 ServerFieldType TypeForTextfield(const views::View* textfield); | 570 ServerFieldType TypeForTextfield(const views::View* textfield); |
| 570 | 571 |
| 571 // Gets the combobox view that is shown for the given |type|, or NULL. | 572 // Gets the combobox view that is shown for the given |type|, or NULL. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 594 // The preferred size of the view, cached to avoid needless recomputation. | 595 // The preferred size of the view, cached to avoid needless recomputation. |
| 595 mutable gfx::Size preferred_size_; | 596 mutable gfx::Size preferred_size_; |
| 596 | 597 |
| 597 // The current number of unmatched calls to UpdatesStarted. | 598 // The current number of unmatched calls to UpdatesStarted. |
| 598 int updates_scope_; | 599 int updates_scope_; |
| 599 | 600 |
| 600 // True when there's been a call to ContentsPreferredSizeChanged() suppressed | 601 // True when there's been a call to ContentsPreferredSizeChanged() suppressed |
| 601 // due to an unmatched UpdatesStarted. | 602 // due to an unmatched UpdatesStarted. |
| 602 bool needs_update_; | 603 bool needs_update_; |
| 603 | 604 |
| 604 // The window that displays |contents_|. Weak pointer; may be NULL when the | 605 // The window that displays the dialog contents. Weak pointer; may be NULL |
| 605 // dialog is closing. | 606 // when the dialog is closing. |
| 606 views::Widget* window_; | 607 views::Widget* window_; |
| 607 | 608 |
| 608 // A DialogSection-keyed map of the DetailGroup structs. | 609 // A DialogSection-keyed map of the DetailGroup structs. |
| 609 DetailGroupMap detail_groups_; | 610 DetailGroupMap detail_groups_; |
| 610 | 611 |
| 611 // Somewhere to show notification messages about errors, warnings, or promos. | 612 // Somewhere to show notification messages about errors, warnings, or promos. |
| 612 NotificationArea* notification_area_; | 613 NotificationArea* notification_area_; |
| 613 | 614 |
| 614 // Runs the suggestion menu (triggered by each section's |suggested_button|. | 615 // Runs the suggestion menu (triggered by each section's |suggested_button|. |
| 615 scoped_ptr<views::MenuRunner> menu_runner_; | 616 scoped_ptr<views::MenuRunner> menu_runner_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 678 |
| 678 // Used to tell the delegate when focus moves to hide the Autofill popup. | 679 // Used to tell the delegate when focus moves to hide the Autofill popup. |
| 679 scoped_ptr<ui::EventHandler> event_handler_; | 680 scoped_ptr<ui::EventHandler> event_handler_; |
| 680 | 681 |
| 681 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 682 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 682 }; | 683 }; |
| 683 | 684 |
| 684 } // namespace autofill | 685 } // namespace autofill |
| 685 | 686 |
| 686 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 687 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| OLD | NEW |