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

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: Merge ConstrainedWebDialog functions Created 4 years 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
« no previous file with comments | « components/constrained_window/DEPS ('k') | components/constrained_window/constrained_window_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 972fca88ecfed68f9a1f3379216b8715b9db8442..181f157e437c39b59cb5e4c7538ace3902197926 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 {
@@ -51,7 +52,32 @@ content::WebContents* GetTopLevelWebContents(
void ShowModalDialog(gfx::NativeWindow dialog,
content::WebContents* web_contents);
-// Calls CreateWebModalDialogViews, shows the dialog, and returns its widget.
+// Shows the dialog with a new SingleWebContentsDialogManager as a top level
+// dialog. The dialog is top level but will not block events to the dialog host
+// window. The dialog will be a transient child of the host window (Windows) or
+// of its parent (Linux/CrOS). The dialog will notify via WillClose() when it is
+// being destroyed. |target| will be attached to the host window as a handler
+// for accelerators. Note that unlike ShowTopLevelWebModalDialogViews, |dialog|
+// should already have a widget before this is called.
+void ShowTopLevelModalDialog(gfx::NativeWindow dialog,
+ content::WebContents* web_contents,
+ ui::AcceleratorTarget *target);
+
+// If |dialog| is child modal, calls CreateWebModalDialogViews, shows the
+// dialog, and returns its widget. If |dialog| is not child modal, create a
+// widget for |dialog| and show the dialog as a top level dialog without
+// blocking events to the top level dialog host window for |web_contents|. The
+// modal type will be the same as that of |dialog|. For Mac, which uses sheets,
+// this has the same behavior as ShowWebModalDialogViews. If non-null and
+// if |dialog| is not child modal, |target| will be attached to the host window
+// as a handler for accelerators.
+views::Widget* ShowWebModalDialogViews(
+ views::WidgetDelegate* dialog,
+ content::WebContents* initiator_web_contents,
+ ui::AcceleratorTarget* target);
+
+// Calls the function above with |target| = nullptr. |dialog| should be child
+// modal.
views::Widget* ShowWebModalDialogViews(
views::WidgetDelegate* dialog,
content::WebContents* initiator_web_contents);
« no previous file with comments | « components/constrained_window/DEPS ('k') | components/constrained_window/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698