Commit bc44debb authored by jiayl@chromium.org's avatar jiayl@chromium.org

Do not filter the picker window with Aura.

The picker window is embedded in the parent window and does not have its own native window.

TESTED=verified on Linux, Win and ChromeOS that the picker window is not listed to share with or without a delegate tab, and the chrome window is correctly listed.

BUG=384370

Review URL: https://codereview.chromium.org/338503007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277866 0039d316-1c4b-4281-b951-d872f2087c98
parent 1182aa1b
......@@ -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) {
#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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment