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 "components/web_modal/native_web_contents_modal_dialog.h" | |
10 #include "content/public/browser/web_ui_controller.h" | 9 #include "content/public/browser/web_ui_controller.h" |
11 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
12 | 11 |
13 namespace gfx { | 12 namespace gfx { |
14 class Size; | 13 class Size; |
15 } | 14 } |
16 | 15 |
17 namespace content { | 16 namespace content { |
18 class BrowserContext; | 17 class BrowserContext; |
19 class RenderViewHost; | 18 class RenderViewHost; |
(...skipping 16 matching lines...) Expand all Loading... |
36 | 35 |
37 // If called, on dialog closure, the dialog will release its WebContents | 36 // If called, on dialog closure, the dialog will release its WebContents |
38 // instead of destroying it. After which point, the caller will own the | 37 // instead of destroying it. After which point, the caller will own the |
39 // released WebContents. | 38 // released WebContents. |
40 virtual void ReleaseWebContentsOnDialogClose() = 0; | 39 virtual void ReleaseWebContentsOnDialogClose() = 0; |
41 | 40 |
42 // Returns the WebContents owned by the constrained window. | 41 // Returns the WebContents owned by the constrained window. |
43 virtual content::WebContents* GetWebContents() = 0; | 42 virtual content::WebContents* GetWebContents() = 0; |
44 | 43 |
45 // Returns the native type used to display the dialog. | 44 // Returns the native type used to display the dialog. |
46 virtual web_modal::NativeWebContentsModalDialog GetNativeDialog() = 0; | 45 virtual gfx::NativeWindow GetNativeDialog() = 0; |
47 | 46 |
48 // Returns the minimum size for the dialog. | 47 // Returns the minimum size for the dialog. |
49 virtual gfx::Size GetMinimumSize() const = 0; | 48 virtual gfx::Size GetMinimumSize() const = 0; |
50 | 49 |
51 // Returns the maximum size for the dialog. | 50 // Returns the maximum size for the dialog. |
52 virtual gfx::Size GetMaximumSize() const = 0; | 51 virtual gfx::Size GetMaximumSize() const = 0; |
53 | 52 |
54 virtual gfx::Size GetPreferredSize() const = 0; | 53 virtual gfx::Size GetPreferredSize() const = 0; |
55 | 54 |
56 protected: | 55 protected: |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // |min_size| is the minimum size of the dialog. | 107 // |min_size| is the minimum size of the dialog. |
109 // |max_size| is the maximum size of the dialog. | 108 // |max_size| is the maximum size of the dialog. |
110 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 109 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
111 content::BrowserContext* browser_context, | 110 content::BrowserContext* browser_context, |
112 ui::WebDialogDelegate* delegate, | 111 ui::WebDialogDelegate* delegate, |
113 content::WebContents* overshadowed, | 112 content::WebContents* overshadowed, |
114 const gfx::Size& min_size, | 113 const gfx::Size& min_size, |
115 const gfx::Size& max_size); | 114 const gfx::Size& max_size); |
116 | 115 |
117 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 116 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
OLD | NEW |