| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/common/content_switches_internal.h" | 5 #include "content/common/content_switches_internal.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
| 16 #include "ui/gfx/win/direct_write.h" | 16 #include "ui/gfx/win/direct_write.h" |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 #if defined(OS_CHROMEOS) | |
| 20 #include "base/sys_info.h" | |
| 21 #endif | |
| 22 | |
| 23 namespace content { | 19 namespace content { |
| 24 | 20 |
| 25 namespace { | 21 namespace { |
| 26 | 22 |
| 27 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 28 static bool g_win32k_renderer_lockdown_disabled = false; | 24 static bool g_win32k_renderer_lockdown_disabled = false; |
| 29 #endif | 25 #endif |
| 30 | 26 |
| 31 bool IsUseZoomForDSFEnabledByDefault() { | 27 bool IsUseZoomForDSFEnabledByDefault() { |
| 32 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 33 // TODO(oshima): Device emulation needs to be fixed to pass | 29 return true; |
| 34 // all tests on bots. crbug.com/584709. | |
| 35 return base::SysInfo::IsRunningOnChromeOS(); | |
| 36 #else | 30 #else |
| 37 return false; | 31 return false; |
| 38 #endif | 32 #endif |
| 39 } | 33 } |
| 40 | 34 |
| 41 } // namespace | 35 } // namespace |
| 42 | 36 |
| 43 bool IsPinchToZoomEnabled() { | 37 bool IsPinchToZoomEnabled() { |
| 44 const base::CommandLine& command_line = | 38 const base::CommandLine& command_line = |
| 45 *base::CommandLine::ForCurrentProcess(); | 39 *base::CommandLine::ForCurrentProcess(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 bool enabled = | 88 bool enabled = |
| 95 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || | 89 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || |
| 96 use_zoom_for_dsf_enabled_by_default) && | 90 use_zoom_for_dsf_enabled_by_default) && |
| 97 command_line->GetSwitchValueASCII( | 91 command_line->GetSwitchValueASCII( |
| 98 switches::kEnableUseZoomForDSF) != "false"; | 92 switches::kEnableUseZoomForDSF) != "false"; |
| 99 | 93 |
| 100 return enabled; | 94 return enabled; |
| 101 } | 95 } |
| 102 | 96 |
| 103 } // namespace content | 97 } // namespace content |
| OLD | NEW |