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

Unified Diff: components/constrained_window/constrained_window_views.h

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac build error Created 4 years, 3 months 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: components/constrained_window/constrained_window_views.h
diff --git a/components/constrained_window/constrained_window_views.h b/components/constrained_window/constrained_window_views.h
index d939f2d6e561a632a656583990e7859e917e5c0e..8a10e8231c29bbe564a11c799094456edca1ad0e 100644
--- a/components/constrained_window/constrained_window_views.h
+++ b/components/constrained_window/constrained_window_views.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "ui/base/accelerators/accelerator.h"
#include "ui/gfx/native_widget_types.h"
namespace content {
@@ -47,6 +48,16 @@ void UpdateWidgetModalDialogPosition(
void ShowModalDialog(gfx::NativeWindow dialog,
content::WebContents* web_contents);
+// Shows the dialog with a new SingleWebContentsDialogManager as a top level
+// dialog (peer of the |web_contents| native window dialog host rather than a
sky 2016/09/16 16:40:24 It isn't a peer, is it? It's a top level, right?
+// child). The dialog is top level but will not block access to the dialog host
+// window, which will be its transient parent. The dialog will notify via
+// WillClose() when it is being destroyed. |target| will be attached to the host
+// window as a handler for accelerators.
+void ShowTopLevelModalDialog(gfx::NativeWindow dialog,
sky 2016/09/16 16:40:24 Can we move this logic into ShowWebModalDialogView
+ content::WebContents* web_contents,
+ ui::AcceleratorTarget *target);
+
// Calls CreateWebModalDialogViews, shows the dialog, and returns its widget.
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
@@ -62,6 +73,15 @@ views::Widget* ShowWebModalDialogWithOverlayViews(
content::WebContents* initiator_web_contents);
#endif
+// Creates a widget for |dialog| and shows the dialog as a top level dialog
+// that does not block events to the top level dialog host window for
+// |web_contents|. Returns the widget created. For Mac, which uses sheets,
+// this has the same behavior as ShowWebModalDialogViews.
+views::Widget* ShowTopLevelWebModalDialogViews(
sky 2016/09/16 16:40:24 I'm confused by the need for this and ShowTopLevel
+ views::WidgetDelegate* dialog,
+ content::WebContents* initiator_web_contents,
+ ui::AcceleratorTarget* target);
+
// Create a widget for |dialog| that is modal to |web_contents|.
// The modal type of |dialog->GetModalType()| must be ui::MODAL_TYPE_CHILD.
views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,

Powered by Google App Engine
This is Rietveld 408576698