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. | |
56 virtual gfx::Size GetPreferredSize() const = 0; | 54 virtual gfx::Size GetPreferredSize() const = 0; |
57 | 55 |
58 protected: | 56 protected: |
59 virtual ~ConstrainedWebDialogDelegate() {} | 57 virtual ~ConstrainedWebDialogDelegate() {} |
60 }; | 58 }; |
61 | 59 |
62 // ConstrainedWebDialogUI is a facility to show HTML WebUI content | 60 // ConstrainedWebDialogUI is a facility to show HTML WebUI content |
63 // in a tab-modal constrained dialog. It is implemented as an adapter | 61 // in a tab-modal constrained dialog. It is implemented as an adapter |
64 // between an WebDialogUI object and a web contents modal dialog. | 62 // between an WebDialogUI object and a web contents modal dialog. |
65 // | 63 // |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // |min_size| is the minimum size of the dialog. | 108 // |min_size| is the minimum size of the dialog. |
111 // |max_size| is the maximum size of the dialog. | 109 // |max_size| is the maximum size of the dialog. |
112 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 110 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
113 content::BrowserContext* browser_context, | 111 content::BrowserContext* browser_context, |
114 ui::WebDialogDelegate* delegate, | 112 ui::WebDialogDelegate* delegate, |
115 content::WebContents* overshadowed, | 113 content::WebContents* overshadowed, |
116 const gfx::Size& min_size, | 114 const gfx::Size& min_size, |
117 const gfx::Size& max_size); | 115 const gfx::Size& max_size); |
118 | 116 |
119 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 117 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
OLD | NEW |