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

Unified Diff: chromecast/renderer/cast_content_renderer_client.cc

Issue 1075043004: Fixes bug where cast_shell uses fraction of screen on ATV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: chromecast/renderer/cast_content_renderer_client.cc
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc
index 371cf315ce2d82f0c95b65b653356ee1a95eeab2..cfce89371aaadb57107683a0b695ece83af72df5 100644
--- a/chromecast/renderer/cast_content_renderer_client.cc
+++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -147,6 +147,13 @@ void CastContentRendererClient::RenderViewCreated(
webview->settings()->setShrinksViewportContentToFit(false);
webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false);
+ // Scale 1 ensures window.innerHeight/Width match application resolution.
+ // PageScaleOverride is the 'user agent' value which overrides page
+ // settings (from meta viewport tag) - thus preventing inconsistency
+ // between Android and non-Android cast_shell.
+ webview->setDefaultPageScaleLimits(1.f, 1.f);
+ webview->setInitialPageScaleOverride(1.f);
lcwu1 2015/04/24 00:54:21 Do we need both? ISTM the first API call should be
halliwell 2015/04/24 01:02:38 I believe we want the second call to override the
lcwu1 2015/04/24 01:05:58 This sounds correct to me, as the order seems to b
halliwell 2015/04/27 17:44:20 I tried this, and it does work (setting initial sc
+
// Disable application cache as Chromecast doesn't support off-line
// application running.
webview->settings()->setOfflineWebApplicationCacheEnabled(false);
« 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