Chromium Code Reviews| 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, |