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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1972433002: [Chromecast] Handle device scale factor correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test compile error Created 4 years, 7 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 | « chromecast/browser/android/cast_window_android.cc ('k') | chromecast/browser/cast_content_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 6d278e289808c7d06f6da53c15d345e25838033f..b4c86b0b2d41a0c733dcccf086087266a4b24e6d 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -368,11 +368,7 @@ int CastBrowserMainParts::PreCreateThreads() {
#endif
#if defined(USE_AURA)
- // Screen can (and should) exist even with no displays connected. Its presence
- // is assumed as an interface to access display information, e.g. from metrics
- // code. See CastContentWindow::CreateWindowTree for update when resolution
- // is available.
- cast_browser_process_->SetCastScreen(base::WrapUnique(new CastScreen));
+ cast_browser_process_->SetCastScreen(base::WrapUnique(new CastScreen()));
DCHECK(!display::Screen::GetScreen());
display::Screen::SetScreenInstance(cast_browser_process_->cast_screen());
#endif
@@ -424,11 +420,10 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
// TODO(halliwell) move audio builds to use ozone_platform_cast, then can
// simplify this by removing DISABLE_DISPLAY condition. Should then also
// assert(ozone_platform_cast) in BUILD.gn where it depends on //ui/ozone.
- video_plane_controller_.reset(
- new media::VideoPlaneController(GetMediaTaskRunner()));
- cast_browser_process_->cast_screen()->SetDisplayResizeCallback(
- base::Bind(&media::VideoPlaneController::SetGraphicsPlaneResolution,
- base::Unretained(video_plane_controller_.get())));
+ gfx::Size display_size =
+ display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel();
+ video_plane_controller_.reset(new media::VideoPlaneController(
+ Size(display_size.width(), display_size.height()), GetMediaTaskRunner()));
ui::OverlayManagerCast::SetOverlayCompositedCallback(
base::Bind(&media::VideoPlaneController::SetGeometry,
base::Unretained(video_plane_controller_.get())));
« no previous file with comments | « chromecast/browser/android/cast_window_android.cc ('k') | chromecast/browser/cast_content_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698