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 5ae6cd7776da6ae7eb24433ddda5d07c808fa9bd..d3c2a5dd0874c3024e999238cf21c92360895975 100644 |
| --- a/components/constrained_window/constrained_window_views.cc |
| +++ b/components/constrained_window/constrained_window_views.cc |
| @@ -11,6 +11,7 @@ |
| #include "components/web_modal/web_contents_modal_dialog_host.h" |
| #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| +#include "content/public/browser/web_contents_source.h" |
| #include "ui/views/border.h" |
| #include "ui/views/widget/widget.h" |
| #include "ui/views/widget/widget_observer.h" |
| @@ -146,6 +147,16 @@ views::Widget* ShowWebModalDialogViews( |
| views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, |
| content::WebContents* web_contents) { |
| + // Code to help trace the source of http://crbug.com/538612 |
| + WebContentsSource* web_contents_creation_site = |
| + WebContentsSource::FromWebContents(web_contents); |
| + tracked_objects::Location created_location; |
| + if (web_contents_creation_site) |
| + created_location = web_contents_creation_site->created_location(); |
| + base::debug::Alias(&created_location); |
|
Mike Wittman
2015/11/11 17:15:28
needs an #include
hcarmona
2015/11/11 19:57:58
Done.
|
| + CHECK( |
| + web_modal::WebContentsModalDialogManager::FromWebContents(web_contents)); |
| + |
| DCHECK_EQ(ui::MODAL_TYPE_CHILD, dialog->GetModalType()); |
| return views::DialogDelegate::CreateDialogWidget( |
| dialog, nullptr, |