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

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

Issue 100833002: Add AshDesktopMediaList and enable Desktop Capture API on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/browser/media/ash_desktop_media_list_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 cb9007fff365b15c09b574073f74774ef1ea13fa..51667a348e73452d6106ce243531b89170811834 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc
@@ -495,23 +495,29 @@ DesktopMediaPickerDialogView::DesktopMediaPickerDialogView(
// DesktopMediaList needs to know the ID of the picker window which
// matches the ID it gets from the OS. Depending on the OS and configuration
// we get this ID differently.
- //
- // TODO(sergeyu): Update this code when Ash-specific window capturer is
- // implemented. Currently this code will always get native windows ID
- // which is not what we need in Ash. http://crbug.com/295102
- content::DesktopMediaID::Id dialog_window_id;
+ content::DesktopMediaID::Id dialog_window_id = 0;
#if defined(OS_WIN)
dialog_window_id = reinterpret_cast<content::DesktopMediaID::Id>(
views::HWNDForWidget(GetWidget()));
#elif defined(USE_AURA)
- dialog_window_id = static_cast<content::DesktopMediaID::Id>(
- GetWidget()->GetNativeWindow()->GetDispatcher()->host()->
- GetAcceleratedWidget());
-#else
+
+#if defined(USE_ASH)
+ if (ash::Shell::HasInstance()) {
Ben Goodger (Google) 2013/12/19 04:01:07 instead of doing this, you probably should instead
Sergey Ulanov 2013/12/20 01:43:08 Done.
+ dialog_window_id = content::DesktopMediaID::RegisterAuraWindow(
+ GetWidget()->GetNativeWindow()).id;
+ } else
+#endif
+ {
+ dialog_window_id = static_cast<content::DesktopMediaID::Id>(
+ GetWidget()->GetNativeWindow()->GetDispatcher()->host()->
+ GetAcceleratedWidget());
+ }
+
+#else // defined(USE_AURA)
dialog_window_id = 0;
NOTIMPLEMENTED();
-#endif
+#endif // !defined(USE_AURA)
list_view_->StartUpdating(dialog_window_id);
« no previous file with comments | « chrome/browser/media/ash_desktop_media_list_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698