Index: components/web_modal/web_contents_modal_dialog_manager.cc |
diff --git a/components/web_modal/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc |
index 52b404580291059c6c5d0bd1338ffbb2788ad2e6..6217d3e7f3daacd590f48f55bdf4fa45671f7b68 100644 |
--- a/components/web_modal/web_contents_modal_dialog_manager.cc |
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc |
@@ -35,9 +35,13 @@ void WebContentsModalDialogManager::SetDelegate( |
} |
} |
-void WebContentsModalDialogManager::ShowModalDialog(gfx::NativeWindow dialog) { |
- std::unique_ptr<SingleWebContentsDialogManager> mgr( |
- CreateNativeWebModalManager(dialog, this)); |
+void WebContentsModalDialogManager::ShowModalDialog(gfx::NativeWindow dialog, |
+ bool parented) { |
+ std::unique_ptr<SingleWebContentsDialogManager> mgr; |
+ if (parented) |
+ mgr.reset(CreateParentedNativeWebModalManager(dialog, this)); |
tapted
2016/05/13 06:08:46
avoid this on !mac
Patti Lor
2016/05/18 04:48:38
Done.
|
+ else |
+ mgr.reset(CreateNativeWebModalManager(dialog, this)); |
ShowDialogWithManager(dialog, std::move(mgr)); |
} |