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

Side by Side Diff: chrome/common/chrome_switches.cc

Issue 2503663002: Printing: Add command line switch to rendering text with GDI. (Closed)
Patch Set: Sort Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "printing/features/features.h" 10 #include "printing/features/features.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 // be a BSD device name of the form "diskN" or "diskNsM". 1176 // be a BSD device name of the form "diskN" or "diskNsM".
1177 const char kRelauncherProcessDMGDevice[] = "dmg-device"; 1177 const char kRelauncherProcessDMGDevice[] = "dmg-device";
1178 1178
1179 // Indicates whether Chrome should be set as the default browser during 1179 // Indicates whether Chrome should be set as the default browser during
1180 // installation. 1180 // installation.
1181 const char kMakeChromeDefault[] = "make-chrome-default"; 1181 const char kMakeChromeDefault[] = "make-chrome-default";
1182 #endif // defined(OS_MACOSX) 1182 #endif // defined(OS_MACOSX)
1183 1183
1184 #if defined(OS_WIN) 1184 #if defined(OS_WIN)
1185 // Disables using GDI to print text as simply text. Fallback to printing text 1185 // Disables using GDI to print text as simply text. Fallback to printing text
1186 // as paths. 1186 // as paths. Overrides --enable-gdi-text-printing.
1187 const char kDisableGDITextPrinting[] = "disable-gdi-text-printing"; 1187 const char kDisableGDITextPrinting[] = "disable-gdi-text-printing";
1188 1188
1189 // Disables per monitor DPI for supported Windows versions. 1189 // Disables per monitor DPI for supported Windows versions.
1190 // This flag overrides kEnablePerMonitorDpi. 1190 // This flag overrides kEnablePerMonitorDpi.
1191 const char kDisablePerMonitorDpi[] = "disable-per-monitor-dpi"; 1191 const char kDisablePerMonitorDpi[] = "disable-per-monitor-dpi";
1192 1192
1193 // Fallback to XPS. By default connector uses CDD. 1193 // Fallback to XPS. By default connector uses CDD.
1194 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps"; 1194 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps";
1195 1195
1196 // Enables using GDI to print text as simply text.
1197 const char kEnableGDITextPrinting[] = "enable-gdi-text-printing";
1198
1196 // Enables per monitor DPI for supported Windows versions. 1199 // Enables per monitor DPI for supported Windows versions.
1197 const char kEnablePerMonitorDpi[] = "enable-per-monitor-dpi"; 1200 const char kEnablePerMonitorDpi[] = "enable-per-monitor-dpi";
1198 1201
1199 // Force-enables the profile shortcut manager. This is needed for tests since 1202 // Force-enables the profile shortcut manager. This is needed for tests since
1200 // they use a custom-user-data-dir which disables this. 1203 // they use a custom-user-data-dir which disables this.
1201 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager"; 1204 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager";
1202 1205
1203 // Makes Windows happy by allowing it to show "Enable access to this program" 1206 // Makes Windows happy by allowing it to show "Enable access to this program"
1204 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only 1207 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
1205 // shows an error box because the only way to hide Chrome is by uninstalling 1208 // shows an error box because the only way to hide Chrome is by uninstalling
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 #endif 1303 #endif
1301 } 1304 }
1302 1305
1303 #if defined(OS_CHROMEOS) 1306 #if defined(OS_CHROMEOS)
1304 bool PowerOverlayEnabled() { 1307 bool PowerOverlayEnabled() {
1305 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1308 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1306 ::switches::kEnablePowerOverlay); 1309 ::switches::kEnablePowerOverlay);
1307 } 1310 }
1308 #endif 1311 #endif
1309 1312
1313 #if defined(OS_WIN)
1314 bool GDITextPrintingEnabled() {
1315 const auto& command_line = *base::CommandLine::ForCurrentProcess();
1316 if (command_line.HasSwitch(kDisableGDITextPrinting))
1317 return false;
1318 return command_line.HasSwitch(kEnableGDITextPrinting);
1319 }
1320 #endif
1321
1310 // ----------------------------------------------------------------------------- 1322 // -----------------------------------------------------------------------------
1311 // DO NOT ADD YOUR VERY NICE FLAGS TO THE BOTTOM OF THIS FILE. 1323 // DO NOT ADD YOUR VERY NICE FLAGS TO THE BOTTOM OF THIS FILE.
1312 // 1324 //
1313 // You were going to just dump your switches here, weren't you? Instead, please 1325 // You were going to just dump your switches here, weren't you? Instead, please
1314 // put them in alphabetical order above, or in order inside the appropriate 1326 // put them in alphabetical order above, or in order inside the appropriate
1315 // ifdef at the bottom. The order should match the header. 1327 // ifdef at the bottom. The order should match the header.
1316 // ----------------------------------------------------------------------------- 1328 // -----------------------------------------------------------------------------
1317 1329
1318 } // namespace switches 1330 } // namespace switches
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698