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_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/public/browser/web_ui_controller.h" | 9 #include "content/public/browser/web_ui_controller.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Returns the native type used to display the dialog. | 44 // Returns the native type used to display the dialog. |
45 virtual gfx::NativeWindow GetNativeDialog() = 0; | 45 virtual gfx::NativeWindow GetNativeDialog() = 0; |
46 | 46 |
47 // Returns the minimum size for the dialog. | 47 // Returns the minimum size for the dialog. |
48 virtual gfx::Size GetMinimumSize() const = 0; | 48 virtual gfx::Size GetMinimumSize() const = 0; |
49 | 49 |
50 // Returns the maximum size for the dialog. | 50 // Returns the maximum size for the dialog. |
51 virtual gfx::Size GetMaximumSize() const = 0; | 51 virtual gfx::Size GetMaximumSize() const = 0; |
52 | 52 |
| 53 // Returns the preferred size for the dialog, or an empty size if |
| 54 // the dialog has been closed. |
53 virtual gfx::Size GetPreferredSize() const = 0; | 55 virtual gfx::Size GetPreferredSize() const = 0; |
54 | 56 |
55 protected: | 57 protected: |
56 virtual ~ConstrainedWebDialogDelegate() {} | 58 virtual ~ConstrainedWebDialogDelegate() {} |
57 }; | 59 }; |
58 | 60 |
59 // ConstrainedWebDialogUI is a facility to show HTML WebUI content | 61 // ConstrainedWebDialogUI is a facility to show HTML WebUI content |
60 // in a tab-modal constrained dialog. It is implemented as an adapter | 62 // in a tab-modal constrained dialog. It is implemented as an adapter |
61 // between an WebDialogUI object and a web contents modal dialog. | 63 // between an WebDialogUI object and a web contents modal dialog. |
62 // | 64 // |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // |min_size| is the minimum size of the dialog. | 109 // |min_size| is the minimum size of the dialog. |
108 // |max_size| is the maximum size of the dialog. | 110 // |max_size| is the maximum size of the dialog. |
109 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 111 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
110 content::BrowserContext* browser_context, | 112 content::BrowserContext* browser_context, |
111 ui::WebDialogDelegate* delegate, | 113 ui::WebDialogDelegate* delegate, |
112 content::WebContents* overshadowed, | 114 content::WebContents* overshadowed, |
113 const gfx::Size& min_size, | 115 const gfx::Size& min_size, |
114 const gfx::Size& max_size); | 116 const gfx::Size& max_size); |
115 | 117 |
116 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 118 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
OLD | NEW |