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

Unified Diff: chrome/browser/media/desktop_media_list_ash.cc

Issue 615133002: Add support for a virtual display on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 5 years, 10 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
Index: chrome/browser/media/desktop_media_list_ash.cc
diff --git a/chrome/browser/media/desktop_media_list_ash.cc b/chrome/browser/media/desktop_media_list_ash.cc
index d24ec21b2b1c493942bb5472bfe57dacb2610b98..fc02c68fd925c27fb97a7b39962b22a66e4d52ef 100644
--- a/chrome/browser/media/desktop_media_list_ash.cc
+++ b/chrome/browser/media/desktop_media_list_ash.cc
@@ -11,6 +11,7 @@
#include "base/hash.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/sys_info.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/media/desktop_media_list_observer.h"
#include "chrome/grit/generated_resources.h"
@@ -18,6 +19,7 @@
#include "media/base/video_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/dip_util.h"
+#include "ui/display/chromeos/display_configurator.h"
#include "ui/gfx/image/image.h"
#include "ui/snapshot/snapshot.h"
@@ -209,6 +211,23 @@ void DesktopMediaListAsh::EnumerateSources(
sources, root_windows[i], ash::kShellWindowId_DockedContainer);
}
}
+#if defined(OS_CHROMEOS)
+ // DisplayConfigurator only works when running on ChromeOS
achuithb 2015/02/11 23:41:43 nit: period at end of comment
+ if (base::SysInfo::IsRunningOnChromeOS()) {
+ ui::DisplayConfigurator* configurator =
+ ash::Shell::GetInstance()->display_configurator();
+ if (configurator->GetVirtualDisplayId() ==
+ gfx::Display::kInvalidDisplayID) {
+ SourceDescription virtual_screen_source(
+ content::DesktopMediaID(
+ content::DesktopMediaID::TYPE_AURA_VIRTUAL_SCREEN, 0),
+ l10n_util::GetStringUTF16(
+ IDS_DESTOP_MEDIA_PICKER_VIRTUAL_SCREEN_NAME));
+ sources->push_back(virtual_screen_source);
+ // TODO: There is no thumbnail for the virtual screen right now
achuithb 2015/02/11 23:41:43 period at the end. Add your name in the TODO(<name
+ }
+ }
+#endif
}
void DesktopMediaListAsh::CaptureThumbnail(content::DesktopMediaID id,

Powered by Google App Engine
This is Rietveld 408576698