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 ab195bfdc2f37a2fefa4470c6dcf3b81df74f54b..9e21558ab41626f2653c01dc77cfdb0eeac42430 100644 |
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc |
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc |
@@ -565,16 +565,23 @@ DesktopMediaPickerDialogView::DesktopMediaPickerDialogView( |
// matches the ID it gets from the OS. Depending on the OS and configuration |
// we get this ID differently. |
content::DesktopMediaID::Id dialog_window_id = 0; |
+ |
+ // If there is |parent_window| or |parent_web_contents|, the picker window |
+ // is embedded in the parent and does not have its own native window id, so we |
+ // do not filter in that case. |
+ if (!parent_window && !parent_web_contents) { |
Sergey Ulanov
2014/06/16 21:48:43
You need just !parent_web_contents. parent_window
jiayl
2014/06/16 22:07:34
That's not true. If the parent_web_contents is NUL
Sergey Ulanov
2014/06/16 22:14:00
Did you try it with Ash? I think with Ash you'll g
|
#if defined(USE_ASH) |
- if (chrome::IsNativeWindowInAsh(widget->GetNativeWindow())) { |
- dialog_window_id = content::DesktopMediaID::RegisterAuraWindow( |
- widget->GetNativeWindow()).id; |
- DCHECK_NE(dialog_window_id, 0); |
- } |
+ if (chrome::IsNativeWindowInAsh(widget->GetNativeWindow())) { |
+ dialog_window_id = content::DesktopMediaID::RegisterAuraWindow( |
+ widget->GetNativeWindow()).id; |
+ DCHECK_NE(dialog_window_id, 0); |
+ } |
#endif |
- if (dialog_window_id == 0) { |
- dialog_window_id = AcceleratedWidgetToDesktopMediaId( |
- widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()); |
+ |
+ if (dialog_window_id == 0) { |
+ dialog_window_id = AcceleratedWidgetToDesktopMediaId( |
+ widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()); |
+ } |
} |
list_view_->StartUpdating(dialog_window_id); |