OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/common/chrome_switches.h" | 5 #include "chrome/common/chrome_switches.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 | 9 |
10 namespace switches { | 10 namespace switches { |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 const char kExposePrivateExtensionApi[] = "expose-private-extension-api"; | 1162 const char kExposePrivateExtensionApi[] = "expose-private-extension-api"; |
1163 #endif | 1163 #endif |
1164 | 1164 |
1165 #if defined(HAVE_XINPUT2) | 1165 #if defined(HAVE_XINPUT2) |
1166 // Tells chrome to interpret events from these devices as touch events. Only | 1166 // Tells chrome to interpret events from these devices as touch events. Only |
1167 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the devices | 1167 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the devices |
1168 // can be retrieved from 'xinput list'. | 1168 // can be retrieved from 'xinput list'. |
1169 const char kTouchDevices[] = "touch-devices"; | 1169 const char kTouchDevices[] = "touch-devices"; |
1170 #endif | 1170 #endif |
1171 | 1171 |
1172 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) | |
1173 // Disable print preview (Not exposed via about:flags. Only used for testing.) | |
1174 const char kDisablePrintPreview[] = "disable-print-preview"; | |
1175 | |
1176 bool IsPrintPreviewEnabled() { | |
1177 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisablePrintPreview); | |
1178 } | |
1179 #else | |
1180 // Enable print preview (no PDF viewer, thus not supported with Chromium). | 1172 // Enable print preview (no PDF viewer, thus not supported with Chromium). |
1181 const char kEnablePrintPreview[] = "enable-print-preview"; | 1173 const char kEnablePrintPreview[] = "enable-print-preview"; |
1182 | 1174 |
1183 bool IsPrintPreviewEnabled() { | 1175 bool IsPrintPreviewEnabled() { |
1184 return CommandLine::ForCurrentProcess()->HasSwitch(kEnablePrintPreview); | 1176 return CommandLine::ForCurrentProcess()->HasSwitch(kEnablePrintPreview); |
1185 } | 1177 } |
1186 #endif | |
1187 | 1178 |
1188 bool IsInBrowserThumbnailingEnabled() { | 1179 bool IsInBrowserThumbnailingEnabled() { |
1189 return CommandLine::ForCurrentProcess()->HasSwitch( | 1180 return CommandLine::ForCurrentProcess()->HasSwitch( |
1190 kEnableInBrowserThumbnailing); | 1181 kEnableInBrowserThumbnailing); |
1191 } | 1182 } |
1192 | 1183 |
1193 // ----------------------------------------------------------------------------- | 1184 // ----------------------------------------------------------------------------- |
1194 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1185 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1195 // | 1186 // |
1196 // You were going to just dump your switches here, weren't you? Instead, | 1187 // You were going to just dump your switches here, weren't you? Instead, |
1197 // please put them in alphabetical order above, or in order inside the | 1188 // please put them in alphabetical order above, or in order inside the |
1198 // appropriate ifdef at the bottom. The order should match the header. | 1189 // appropriate ifdef at the bottom. The order should match the header. |
1199 // ----------------------------------------------------------------------------- | 1190 // ----------------------------------------------------------------------------- |
1200 | 1191 |
1201 } // namespace switches | 1192 } // namespace switches |
OLD | NEW |