Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6829)

Unified Diff: chrome/browser/ui/webui/constrained_web_dialog_ui.h

Issue 754953002: Enable AutoResize for Constrained Web Dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..550f42ea3e344e423f49b4079cee564d3ad11dcb 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui.h
+++ b/chrome/browser/ui/webui/constrained_web_dialog_ui.h
@@ -9,6 +9,9 @@
#include "components/web_modal/native_web_contents_modal_dialog.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/gfx/native_widget_types.h"
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
miu 2014/11/26 00:47:44 Instead of including the header, just forward-decl
apacible 2014/11/26 17:35:15 Done.
+#include "ui/gfx/size.h"
+#endif
namespace content {
class BrowserContext;
@@ -41,6 +44,11 @@ class ConstrainedWebDialogDelegate {
// Returns the native type used to display the dialog.
virtual web_modal::NativeWebContentsModalDialog GetNativeDialog() = 0;
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
miu 2014/11/26 00:47:44 This shouldn't be a part of the interface since ou
apacible 2014/11/26 17:35:15 Done.
+ virtual void EnableAutoResize(const gfx::Size& min_size,
+ const gfx::Size& max_size) = 0;
+#endif
+
protected:
virtual ~ConstrainedWebDialogDelegate() {}
};
@@ -87,4 +95,13 @@ ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
ui::WebDialogDelegate* delegate,
content::WebContents* overshadowed);
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
miu 2014/11/26 00:47:44 Again, don't conditionally declare this function,
apacible 2014/11/26 17:35:15 Done.
+ConstrainedWebDialogDelegate* CreateConstrainedWebDialogWithAutoResize(
+ content::BrowserContext* browser_context,
+ ui::WebDialogDelegate* delegate,
+ content::WebContents* overshadowed,
+ gfx::Size min_size,
+ gfx::Size max_size);
+#endif
+
#endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_

Powered by Google App Engine
This is Rietveld 408576698