Index: chrome/browser/ui/webui/constrained_web_dialog_ui.h |
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_ui.h b/chrome/browser/ui/webui/constrained_web_dialog_ui.h |
index 172fab6b2c623a89f0fc471c8a9eedd92d317e0a..ef21a339951eff7c38b6cfe015ebf5912c5e5daf 100644 |
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui.h |
+++ b/chrome/browser/ui/webui/constrained_web_dialog_ui.h |
@@ -10,6 +10,10 @@ |
#include "content/public/browser/web_ui_controller.h" |
#include "ui/gfx/native_widget_types.h" |
+namespace gfx { |
+ class Size; |
Bernhard Bauer
2014/11/27 12:41:34
Don't indent inside of namespaces.
apacible
2014/12/01 17:35:57
Done.
|
+} |
+ |
namespace content { |
class BrowserContext; |
class RenderViewHost; |
@@ -75,16 +79,32 @@ class ConstrainedWebDialogUI : public content::WebUIController { |
DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogUI); |
}; |
-// Create a constrained HTML dialog. The actual object that gets created |
-// is a ConstrainedWebDialogDelegate, which later triggers construction of a |
-// ConstrainedWebDialogUI object. |
+// Create and show a constrained HTML dialog. The actual object that gets |
+// created is a ConstrainedWebDialogDelegate, which later triggers construction |
+// of a ConstrainedWebDialogUI object. |
// |browser_context| is used to construct the constrained HTML dialog's |
// WebContents. |
// |delegate| controls the behavior of the dialog. |
// |overshadowed| is the tab being overshadowed by the dialog. |
-ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( |
+ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( |
content::BrowserContext* browser_context, |
ui::WebDialogDelegate* delegate, |
content::WebContents* overshadowed); |
+// Creates a constrained HTML dialog with auto-resize enabled. The dialog |
Bernhard Bauer
2014/11/27 12:41:34
Nit: Either use imperative style ("create") like a
apacible
2014/12/01 17:35:57
Done.
|
+// is shown by calling constrained_window::ShowModalDialogViews() after |
+// document load has completed to avoid UI jankiness. |
+// |browser_context| is used to construct the constrained HTML dialog's |
+// WebContents. |
+// |delegate| controls the behavior of the dialog. |
+// |overshadowed| is the tab being overshadowed by the dialog. |
+// |min_size| is the minimum size of the dialog. |
+// |max_size| is the maximum size of the dialog. |
+ConstrainedWebDialogDelegate* CreateConstrainedWebDialogWithAutoResize( |
+ content::BrowserContext* browser_context, |
+ ui::WebDialogDelegate* delegate, |
+ content::WebContents* overshadowed, |
+ gfx::Size min_size, |
+ gfx::Size max_size); |
+ |
#endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |