| 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 "chrome/browser/ui/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 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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; |
| 40 | 40 |
| 41 // Returns the native type used to display the dialog. | 41 // Returns the native type used to display the dialog. |
| 42 virtual NativeWebContentsModalDialog GetNativeDialog() = 0; | 42 virtual web_modal::NativeWebContentsModalDialog GetNativeDialog() = 0; |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 virtual ~ConstrainedWebDialogDelegate() {} | 45 virtual ~ConstrainedWebDialogDelegate() {} |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // ConstrainedWebDialogUI is a facility to show HTML WebUI content | 48 // ConstrainedWebDialogUI is a facility to show HTML WebUI content |
| 49 // in a tab-modal constrained dialog. It is implemented as an adapter | 49 // in a tab-modal constrained dialog. It is implemented as an adapter |
| 50 // between an WebDialogUI object and a web contents modal dialog. | 50 // between an WebDialogUI object and a web contents modal dialog. |
| 51 // | 51 // |
| 52 // Since the web contents modal dialog requires platform-specific delegate | 52 // Since the web contents modal dialog requires platform-specific delegate |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // use the default one. The dialog takes ownership of | 88 // use the default one. The dialog takes ownership of |
| 89 // |tab_delegate|. | 89 // |tab_delegate|. |
| 90 // |overshadowed| is the tab being overshadowed by the dialog. | 90 // |overshadowed| is the tab being overshadowed by the dialog. |
| 91 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( | 91 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( |
| 92 content::BrowserContext* browser_context, | 92 content::BrowserContext* browser_context, |
| 93 ui::WebDialogDelegate* delegate, | 93 ui::WebDialogDelegate* delegate, |
| 94 ui::WebDialogWebContentsDelegate* tab_delegate, | 94 ui::WebDialogWebContentsDelegate* tab_delegate, |
| 95 content::WebContents* overshadowed); | 95 content::WebContents* overshadowed); |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 97 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
| OLD | NEW |