Chromium Code Reviews| Index: ui/views/window/dialog_delegate.h |
| diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h |
| index c74f5461ab9f131376a6261deb563a448be75c49..012f758389dbb60831a75c13f01ad14dc62a8fcd 100644 |
| --- a/ui/views/window/dialog_delegate.h |
| +++ b/ui/views/window/dialog_delegate.h |
| @@ -32,6 +32,13 @@ class LabelButton; |
| class VIEWS_EXPORT DialogDelegate : public ui::DialogModel, |
| public WidgetDelegate { |
| public: |
| + enum DialogWidth { |
| + DIALOG_WIDTH_DEFAULT, |
| + DIALOG_WIDTH_SMALL, |
| + DIALOG_WIDTH_MEDIUM, |
| + DIALOG_WIDTH_LARGE, |
| + }; |
| + |
| DialogDelegate(); |
| ~DialogDelegate() override; |
| @@ -87,6 +94,11 @@ class VIEWS_EXPORT DialogDelegate : public ui::DialogModel, |
| // the typical. |
| virtual void UpdateButton(LabelButton* button, ui::DialogButton type); |
| + // Returns the dialog width this dialog should use, or DIALOG_WIDTH_DEFAULT |
| + // for the default width. This value is only honored when MD secondary UI is |
| + // enabled. |
| + virtual DialogWidth GetDefaultDialogWidth() const; |
|
Evan Stade
2016/09/28 16:14:37
nit: I don't think you need "Default" in this fn n
Elly Fong-Jones
2016/09/28 18:44:09
Done.
|
| + |
| // Overridden from ui::DialogModel: |
| int GetDialogButtons() const override; |
| int GetDefaultDialogButton() const override; |
| @@ -143,6 +155,7 @@ class VIEWS_EXPORT DialogDelegateView : public DialogDelegate, |
| void GetAccessibleState(ui::AXViewState* state) override; |
| void ViewHierarchyChanged( |
| const ViewHierarchyChangedDetails& details) override; |
| + gfx::Size GetPreferredSize() const override; |
| private: |
| DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |