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

Unified Diff: content/common/content_switches_internal.cc

Issue 1670953002: Enable use-zoom-for-dsf on chromeos devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/content_switches_internal.cc
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index 27f63c253c35b53d07a0cdd7436a197e815b923f..07386cdf938dfce3b86063423fa896a309935dd2 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -16,6 +16,10 @@
#include "ui/gfx/win/direct_write.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "base/sys_info.h"
+#endif
+
namespace content {
namespace {
@@ -24,6 +28,16 @@ namespace {
static bool g_win32k_renderer_lockdown_disabled = false;
#endif
+bool IsUseZoomForDSFEnabledByDefault() {
+#if defined(OS_CHROMEOS)
+ // TODO(oshima): Device emulation needs to be fixed to pass
+ // all tests on bots. crbug.com/584709.
+ return base::SysInfo::IsRunningOnChromeOS();
+#else
+ return false;
+#endif
+}
+
} // namespace
bool IsPinchToZoomEnabled() {
@@ -84,10 +98,14 @@ V8CacheOptions GetV8CacheOptions() {
}
bool IsUseZoomForDSFEnabled() {
+ static bool use_zoom_for_dsf_enabled_by_default =
+ IsUseZoomForDSFEnabledByDefault();
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- bool enabled = command_line->HasSwitch(switches::kEnableUseZoomForDSF) &&
- command_line->GetSwitchValueASCII(
- switches::kEnableUseZoomForDSF) != "false";
+ bool enabled =
+ (command_line->HasSwitch(switches::kEnableUseZoomForDSF) ||
+ use_zoom_for_dsf_enabled_by_default) &&
+ command_line->GetSwitchValueASCII(
+ switches::kEnableUseZoomForDSF) != "false";
return enabled;
}
« 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