Chromium Code Reviews| Index: components/constrained_window/constrained_window_views.cc |
| diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc |
| index d00551385504274b22bd5666e1d1d8496dd99168..82b01d92bb0ce33697b38f3181da5d292a769acc 100644 |
| --- a/components/constrained_window/constrained_window_views.cc |
| +++ b/components/constrained_window/constrained_window_views.cc |
| @@ -166,8 +166,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, |
| : nullptr; |
| views::Widget* widget = |
| views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent_view); |
| - if (!dialog->UseNewStyleForThisDialog()) |
| + |
| +#if defined(OS_MACOSX) |
| + // On Mac, window modal dialogs are displayed as sheets, so their position is |
| + // managed by the parent window. |
| + bool requires_positioning = false; |
| +#else |
| + bool requires_positioning = dialog->UseNewStyleForThisDialog(); |
|
msw
2015/08/21 18:47:02
nit: decl/init this above the #ifdef block, and ju
jackhou1
2015/08/24 01:41:55
Done.
|
| +#endif |
| + if (!requires_positioning) |
| return widget; |
| + |
| ModalDialogHost* host = constrained_window_views_client-> |
| GetModalDialogHost(parent); |
| if (host) { |