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" | 9 #include "components/web_modal/native_web_contents_modal_dialog.h" |
10 #include "content/public/browser/web_ui_controller.h" | 10 #include "content/public/browser/web_ui_controller.h" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 class RenderViewHost; | 15 class RenderViewHost; |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 class WebDialogDelegate; | 20 class WebDialogDelegate; |
21 class WebDialogWebContentsDelegate; | 21 class WebDialogWebContentsDelegate; |
22 } | 22 } |
23 | 23 |
24 class ConstrainedWebDialogDelegate { | 24 class ConstrainedWebDialogDelegate { |
25 public: | 25 public: |
26 virtual const ui::WebDialogDelegate* GetWebDialogDelegate() const = 0; | 26 virtual const ui::WebDialogDelegate* GetWebDialogDelegate() const = 0; |
27 virtual ui::WebDialogDelegate* GetWebDialogDelegate() = 0; | 27 virtual ui::WebDialogDelegate* GetWebDialogDelegate() = 0; |
28 | 28 |
29 // Called when the dialog is being closed in response to a "DialogClose" | 29 // Called when the dialog is being closed in response to a "dialogClose" |
30 // message from WebUI. | 30 // message from WebUI. |
31 virtual void OnDialogCloseFromWebUI() = 0; | 31 virtual void OnDialogCloseFromWebUI() = 0; |
32 | 32 |
33 // If called, on dialog closure, the dialog will release its WebContents | 33 // If called, on dialog closure, the dialog will release its WebContents |
34 // instead of destroying it. After which point, the caller will own the | 34 // instead of destroying it. After which point, the caller will own the |
35 // released WebContents. | 35 // released WebContents. |
36 virtual void ReleaseWebContentsOnDialogClose() = 0; | 36 virtual void ReleaseWebContentsOnDialogClose() = 0; |
37 | 37 |
38 // Returns the WebContents owned by the constrained window. | 38 // Returns the WebContents owned by the constrained window. |
39 virtual content::WebContents* GetWebContents() = 0; | 39 virtual content::WebContents* GetWebContents() = 0; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // use the default one. The dialog takes ownership of | 87 // use the default one. The dialog takes ownership of |
88 // |tab_delegate|. | 88 // |tab_delegate|. |
89 // |overshadowed| is the tab being overshadowed by the dialog. | 89 // |overshadowed| is the tab being overshadowed by the dialog. |
90 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( | 90 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( |
91 content::BrowserContext* browser_context, | 91 content::BrowserContext* browser_context, |
92 ui::WebDialogDelegate* delegate, | 92 ui::WebDialogDelegate* delegate, |
93 ui::WebDialogWebContentsDelegate* tab_delegate, | 93 ui::WebDialogWebContentsDelegate* tab_delegate, |
94 content::WebContents* overshadowed); | 94 content::WebContents* overshadowed); |
95 | 95 |
96 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 96 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
OLD | NEW |