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 namespace content { | 19 namespace content { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
24 static bool g_win32k_renderer_lockdown_disabled = false; | 24 static bool g_win32k_renderer_lockdown_disabled = false; |
25 #endif | 25 #endif |
26 | 26 |
27 bool IsUseZoomForDSFEnabledByDefault() { | 27 bool IsUseZoomForDSFEnabledByDefault() { |
28 #if defined(OS_CHROMEOS) | |
29 return true; | |
30 #else | |
31 return false; | 28 return false; |
32 #endif | |
33 } | 29 } |
34 | 30 |
35 } // namespace | 31 } // namespace |
36 | 32 |
37 bool IsPinchToZoomEnabled() { | 33 bool IsPinchToZoomEnabled() { |
38 const base::CommandLine& command_line = | 34 const base::CommandLine& command_line = |
39 *base::CommandLine::ForCurrentProcess(); | 35 *base::CommandLine::ForCurrentProcess(); |
40 | 36 |
41 // Enable pinch everywhere unless it's been explicitly disabled. | 37 // Enable pinch everywhere unless it's been explicitly disabled. |
42 return !command_line.HasSwitch(switches::kDisablePinch); | 38 return !command_line.HasSwitch(switches::kDisablePinch); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bool enabled = | 84 bool enabled = |
89 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || | 85 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || |
90 use_zoom_for_dsf_enabled_by_default) && | 86 use_zoom_for_dsf_enabled_by_default) && |
91 command_line->GetSwitchValueASCII( | 87 command_line->GetSwitchValueASCII( |
92 switches::kEnableUseZoomForDSF) != "false"; | 88 switches::kEnableUseZoomForDSF) != "false"; |
93 | 89 |
94 return enabled; | 90 return enabled; |
95 } | 91 } |
96 | 92 |
97 } // namespace content | 93 } // namespace content |
OLD | NEW |