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

Unified Diff: content/renderer/render_view_impl.cc

Issue 11087067: Upstream deviceScaleFactor initialization in render_view_impl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index e4731d7436554ef1843afb6df1ee7cf706407533..0b6baa7cdccca05a0e552630a0e3c126d0d2df3b 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -658,6 +658,11 @@ RenderViewImpl::RenderViewImpl(
#if defined(OS_ANDROID)
scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo());
+ float device_scale_factor = device_info->GetDPIScale();
+ if (device_scale_factor != webview()->deviceScaleFactor()) {
aelias_OOO_until_Jul13 2012/10/10 22:14:12 No need for this if statement, the receiver does t
+ webview()->setDeviceScaleFactor(device_scale_factor);
+ }
+
const std::string region_code =
command_line.HasSwitch(switches::kNetworkCountryIso)
? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso)
« 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