| 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);
|
|
|