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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/renderer/cast_content_renderer_client.h" 5 #include "chromecast/renderer/cast_content_renderer_client.h"
6 6
7 #include <sys/sysinfo.h> 7 #include <sys/sysinfo.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/memory_pressure_listener.h" 10 #include "base/memory/memory_pressure_listener.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 content::RenderView* render_view) { 140 content::RenderView* render_view) {
141 blink::WebView* webview = render_view->GetWebView(); 141 blink::WebView* webview = render_view->GetWebView();
142 if (webview) { 142 if (webview) {
143 webview->setBaseBackgroundColor(kColorBlack); 143 webview->setBaseBackgroundColor(kColorBlack);
144 144
145 // The following settings express consistent behaviors across Cast 145 // The following settings express consistent behaviors across Cast
146 // embedders, though Android has enabled by default for mobile browsers. 146 // embedders, though Android has enabled by default for mobile browsers.
147 webview->settings()->setShrinksViewportContentToFit(false); 147 webview->settings()->setShrinksViewportContentToFit(false);
148 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); 148 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false);
149 149
150 // Scale 1 ensures window.innerHeight/Width match application resolution.
151 // PageScaleOverride is the 'user agent' value which overrides page
152 // settings (from meta viewport tag) - thus preventing inconsistency
153 // between Android and non-Android cast_shell.
154 webview->setDefaultPageScaleLimits(1.f, 1.f);
155 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
156
150 // Disable application cache as Chromecast doesn't support off-line 157 // Disable application cache as Chromecast doesn't support off-line
151 // application running. 158 // application running.
152 webview->settings()->setOfflineWebApplicationCacheEnabled(false); 159 webview->settings()->setOfflineWebApplicationCacheEnabled(false);
153 } 160 }
154 161
155 // Note: RenderView will own the lifetime of its observer. 162 // Note: RenderView will own the lifetime of its observer.
156 new CastRenderViewObserver(render_view); 163 new CastRenderViewObserver(render_view);
157 } 164 }
158 165
159 void CastContentRendererClient::AddKeySystems( 166 void CastContentRendererClient::AddKeySystems(
(...skipping 29 matching lines...) Expand all
189 closure.Run(); 196 closure.Run();
190 return; 197 return;
191 } 198 }
192 199
193 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. 200 // Lifetime is tied to |render_frame| via content::RenderFrameObserver.
194 new CastMediaLoadDeferrer(render_frame, closure); 201 new CastMediaLoadDeferrer(render_frame, closure);
195 } 202 }
196 203
197 } // namespace shell 204 } // namespace shell
198 } // namespace chromecast 205 } // namespace chromecast
OLDNEW
« 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