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

Unified Diff: components/constrained_window/constrained_window_views.cc

Issue 1309583002: [Mac] Enable MacViews bookmark editor behind --enable-mac-views-dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modal
Patch Set: Address comments Created 5 years, 4 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5ae6cd7776da6ae7eb24433ddda5d07c808fa9bd 100644
--- a/components/constrained_window/constrained_window_views.cc
+++ b/components/constrained_window/constrained_window_views.cc
@@ -166,8 +166,18 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
: nullptr;
views::Widget* widget =
views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent_view);
- if (!dialog->UseNewStyleForThisDialog())
+
+ bool requires_positioning = dialog->UseNewStyleForThisDialog();
+
+#if defined(OS_MACOSX)
+ // On Mac, window modal dialogs are displayed as sheets, so their position is
+ // managed by the parent window.
+ requires_positioning = false;
+#endif
+
+ if (!requires_positioning)
return widget;
+
ModalDialogHost* host = constrained_window_views_client->
GetModalDialogHost(parent);
if (host) {
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698