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