Chromium Code Reviews| Index: chrome/browser/ui/views/harmony/sized_dialog_client_view.h |
| diff --git a/chrome/browser/ui/views/harmony/sized_dialog_client_view.h b/chrome/browser/ui/views/harmony/sized_dialog_client_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cd94d063c4e095bd763cb22d9dc5a68c5623b47e |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/harmony/sized_dialog_client_view.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_SIZED_DIALOG_CLIENT_VIEW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_HARMONY_SIZED_DIALOG_CLIENT_VIEW_H_ |
| + |
| +#include "chrome/browser/ui/views/harmony/layout_delegate.h" |
| +#include "ui/views/window/dialog_client_view.h" |
| + |
| +// A DialogClientView that imposes a minimum preferred size on the entire |
| +// dialog, independent of the preferred sizes of any subviews. |
|
Peter Kasting
2017/02/07 00:17:15
Ultimately, will there be dialogs that _don't_ wan
Elly Fong-Jones
2017/02/07 14:02:10
Hmmm, probably not, actually. Moved this logic to
|
| +class SizedDialogClientView : public views::DialogClientView { |
| + public: |
| + SizedDialogClientView(views::Widget* widget, |
| + views::View* content_view, |
| + const gfx::Size& minimum_size); |
| + ~SizedDialogClientView() override; |
| + |
| + // views::DialogClientView: |
| + gfx::Size GetPreferredSize() const override; |
| + |
| + private: |
| + gfx::Size minimum_size_; |
| +}; |
|
Peter Kasting
2017/02/07 00:17:15
Nit: DISALLOW_COPY_AND_ASSIGN
Elly Fong-Jones
2017/02/07 14:02:10
Acknowledged.
|
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_HARMONY_SIZED_DIALOG_CLIENT_VIEW_H_ |