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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 9500015: Pass DefaultDeviceScaleFactor to webkit (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Style nit Created 8 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index a7c8b81ebd72b92b3155ddd73d7eb664a9a09205..15b3fb1a491e2ce13241b0c4eb4d0d8b1a89989c 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -10,6 +10,7 @@
#include "base/metrics/histogram.h"
#include "base/metrics/stats_counters.h"
#include "base/string16.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -457,6 +458,13 @@ WebPreferences TabContents::GetWebkitPrefs(RenderViewHost* rvh,
prefs.accelerated_2d_canvas_enabled = false;
}
+ int default_device_scale_factor;
+ base::StringToInt(command_line.GetSwitchValueASCII(
+ switches::kDefaultDeviceScaleFactor),
+ &default_device_scale_factor);
+
+ prefs.default_device_scale_factor = default_device_scale_factor;
+
content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, &prefs);
return prefs;
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698