Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: chrome/browser/ui/views/desktop_media_picker_views.cc

Issue 338503007: Do not filter the picker window with Aura. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698