| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // of a ConstrainedWebDialogUI object. | 94 // of a ConstrainedWebDialogUI object. |
| 95 // |browser_context| is used to construct the constrained HTML dialog's | 95 // |browser_context| is used to construct the constrained HTML dialog's |
| 96 // WebContents. | 96 // WebContents. |
| 97 // |delegate| controls the behavior of the dialog. | 97 // |delegate| controls the behavior of the dialog. |
| 98 // |overshadowed| is the tab being overshadowed by the dialog. | 98 // |overshadowed| is the tab being overshadowed by the dialog. |
| 99 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( | 99 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( |
| 100 content::BrowserContext* browser_context, | 100 content::BrowserContext* browser_context, |
| 101 ui::WebDialogDelegate* delegate, | 101 ui::WebDialogDelegate* delegate, |
| 102 content::WebContents* overshadowed); | 102 content::WebContents* overshadowed); |
| 103 | 103 |
| 104 // Create and show a constrained HTML dialog that is a peer rather than a child |
| 105 // of the original |web_contents| window. The dialog is top level but does not |
| 106 // prevent access to the original |web_contents| and on some platforms |
| 107 // (ChromeOS) can extend outside of the original parent window. The actual |
| 108 // object that gets created is a ConstrainedWebDialogDelegate, which later |
| 109 // triggers construction of a ConstrainedWebDialogUI object. The returned |
| 110 // object deletes itself when the dialog closes. |
| 111 // |browser_context| is used to construct the constrained HTML dialog's |
| 112 // WebContents. |
| 113 // |delegate| controls the behavior of the dialog. |
| 114 // |web_contents| is the tab being covered by the dialog. |
| 115 ConstrainedWebDialogDelegate* ShowTopLevelConstrainedWebDialog( |
| 116 content::BrowserContext* browser_context, |
| 117 ui::WebDialogDelegate* delegate, |
| 118 content::WebContents* web_contents); |
| 119 |
| 120 // Like ShowTopLevelConstrainedWebDialog, but uses |dialog_host_window| as the |
| 121 // host window for the dialog rather than the modal dialog host view from the |
| 122 // top level window of web_contents. Used for unit test where GetRootView() and |
| 123 // GetHostView() may not work as expected. |
| 124 ConstrainedWebDialogDelegate* ShowTopLevelConstrainedWebDialogInWindow( |
| 125 content::BrowserContext* browser_context, |
| 126 ui::WebDialogDelegate* delegate, |
| 127 content::WebContents* web_contents, |
| 128 gfx::NativeView dialog_host_window); |
| 129 |
| 104 // Create and show a constrained HTML dialog with auto-resize enabled. The | 130 // Create and show a constrained HTML dialog with auto-resize enabled. The |
| 105 // dialog is shown automatically after document load has completed to avoid UI | 131 // dialog is shown automatically after document load has completed to avoid UI |
| 106 // jankiness. | 132 // jankiness. |
| 107 // |browser_context| is used to construct the dialog's WebContents. | 133 // |browser_context| is used to construct the dialog's WebContents. |
| 108 // |delegate| controls the behavior of the dialog. | 134 // |delegate| controls the behavior of the dialog. |
| 109 // |overshadowed| is the tab being overshadowed by the dialog. | 135 // |overshadowed| is the tab being overshadowed by the dialog. |
| 110 // |min_size| is the minimum size of the dialog. | 136 // |min_size| is the minimum size of the dialog. |
| 111 // |max_size| is the maximum size of the dialog. | 137 // |max_size| is the maximum size of the dialog. |
| 112 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 138 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
| 113 content::BrowserContext* browser_context, | 139 content::BrowserContext* browser_context, |
| 114 ui::WebDialogDelegate* delegate, | 140 ui::WebDialogDelegate* delegate, |
| 115 content::WebContents* overshadowed, | 141 content::WebContents* overshadowed, |
| 116 const gfx::Size& min_size, | 142 const gfx::Size& min_size, |
| 117 const gfx::Size& max_size); | 143 const gfx::Size& max_size); |
| 118 | 144 |
| 119 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 145 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
| OLD | NEW |