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

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: Ensure OverrideWebkitPrefs receives correct default_device_scale_factor 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 | « no previous file | 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..cf89d2664140b0a960c2b49ef0aaaf0e77daf6eb 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,14 @@ 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);
+
+ if (default_device_scale_factor)
Fady Samuel 2012/02/29 15:42:25 This if statement is probably not necessary. We ca
tdresser 2012/02/29 16:51:30 Done.
+ prefs.default_device_scale_factor = default_device_scale_factor;
+
content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, &prefs);
return prefs;
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698