Index: chrome/browser/ui/views/desktop_media_picker_views.cc |
diff --git a/chrome/browser/ui/views/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_media_picker_views.cc |
index 8de123b6e708ee5c16595fcac9448a6ecf6b511c..69ec18557efdc764e2d9111950dffd59e95fd453 100644 |
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc |
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc |
@@ -381,8 +381,6 @@ void DesktopMediaListView::AcceptSelection() { |
DesktopMediaPickerDialogView::DesktopMediaPickerDialogView( |
content::WebContents* parent_web_contents, |
- gfx::NativeWindow context, |
- gfx::NativeWindow parent_window, |
DesktopMediaPickerViews* parent, |
const base::string16& app_name, |
const base::string16& target_name, |
@@ -413,12 +411,12 @@ DesktopMediaPickerDialogView::DesktopMediaPickerDialogView( |
// shown in a separate window. |
views::Widget* widget = NULL; |
bool modal_dialog = |
- parent_web_contents && |
!parent_web_contents->GetDelegate()->IsNeverVisible(parent_web_contents); |
if (modal_dialog) { |
widget = CreateWebModalDialogViews(this, parent_web_contents); |
} else { |
- widget = DialogDelegate::CreateDialogWidget(this, context, NULL); |
+ widget = DialogDelegate::CreateDialogWidget( |
+ this, parent_web_contents->GetTopLevelNativeWindow(), NULL); |
} |
// DesktopMediaList needs to know the ID of the picker window which |
@@ -571,16 +569,13 @@ DesktopMediaPickerViews::~DesktopMediaPickerViews() { |
} |
void DesktopMediaPickerViews::Show(content::WebContents* web_contents, |
- gfx::NativeWindow context, |
- gfx::NativeWindow parent, |
const base::string16& app_name, |
const base::string16& target_name, |
scoped_ptr<DesktopMediaList> media_list, |
const DoneCallback& done_callback) { |
callback_ = done_callback; |
dialog_ = new DesktopMediaPickerDialogView( |
- web_contents, context, parent, this, app_name, target_name, |
- media_list.Pass()); |
+ web_contents, this, app_name, target_name, media_list.Pass()); |
} |
void DesktopMediaPickerViews::NotifyDialogResult(DesktopMediaID source) { |