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 def5232fc9782603559d380c6499264f1c8ac6b5..b5efbc784217e406efe08d5373268ecef05034f7 100644 |
--- a/components/constrained_window/constrained_window_views.cc |
+++ b/components/constrained_window/constrained_window_views.cc |
@@ -9,6 +9,7 @@ |
#include "base/macros.h" |
#include "build/build_config.h" |
#include "components/constrained_window/constrained_window_views_client.h" |
+#include "components/constrained_window/native_web_contents_modal_dialog_manager_views.h" |
#include "components/guest_view/browser/guest_view_base.h" |
#include "components/web_modal/web_contents_modal_dialog_host.h" |
#include "components/web_modal/web_contents_modal_dialog_manager.h" |
@@ -141,8 +142,7 @@ views::Widget* ShowWebModalDialogViews( |
content::WebContents* web_contents = |
guest_view::GuestViewBase::GetTopLevelWebContents(initiator_web_contents); |
views::Widget* widget = CreateWebModalDialogViews(dialog, web_contents); |
- web_modal::WebContentsModalDialogManager::FromWebContents(web_contents) |
- ->ShowModalDialog(widget->GetNativeWindow()); |
+ ShowModalDialog(widget->GetNativeWindow(), initiator_web_contents); |
return widget; |
} |