| 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 UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // button in the dialog is Accept, Cancel() otherwise. This function should | 81 // button in the dialog is Accept, Cancel() otherwise. This function should |
| 82 // return true if the window can be closed after it returns, or false if it | 82 // return true if the window can be closed after it returns, or false if it |
| 83 // must remain open. | 83 // must remain open. |
| 84 virtual bool Close(); | 84 virtual bool Close(); |
| 85 | 85 |
| 86 // Updates the properties and appearance of |button| which has been created | 86 // Updates the properties and appearance of |button| which has been created |
| 87 // for type |type|. Override to do special initialization above and beyond | 87 // for type |type|. Override to do special initialization above and beyond |
| 88 // the typical. | 88 // the typical. |
| 89 virtual void UpdateButton(LabelButton* button, ui::DialogButton type); | 89 virtual void UpdateButton(LabelButton* button, ui::DialogButton type); |
| 90 | 90 |
| 91 // Returns true if this dialog should snap the frame width based on the |
| 92 // LayoutProvider's snapping. |
| 93 virtual bool ShouldSnapFrameWidth() const; |
| 94 |
| 91 // Overridden from ui::DialogModel: | 95 // Overridden from ui::DialogModel: |
| 92 int GetDialogButtons() const override; | 96 int GetDialogButtons() const override; |
| 93 int GetDefaultDialogButton() const override; | 97 int GetDefaultDialogButton() const override; |
| 94 bool ShouldDefaultButtonBeBlue() const override; | 98 bool ShouldDefaultButtonBeBlue() const override; |
| 95 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 99 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 96 bool IsDialogButtonEnabled(ui::DialogButton button) const override; | 100 bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
| 97 | 101 |
| 98 // Overridden from WidgetDelegate: | 102 // Overridden from WidgetDelegate: |
| 99 View* GetInitiallyFocusedView() override; | 103 View* GetInitiallyFocusedView() override; |
| 100 DialogDelegate* AsDialogDelegate() override; | 104 DialogDelegate* AsDialogDelegate() override; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void ViewHierarchyChanged( | 153 void ViewHierarchyChanged( |
| 150 const ViewHierarchyChangedDetails& details) override; | 154 const ViewHierarchyChangedDetails& details) override; |
| 151 | 155 |
| 152 private: | 156 private: |
| 153 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 157 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace views | 160 } // namespace views |
| 157 | 161 |
| 158 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 162 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |