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

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

Issue 7631008: Print Preview: Add "print preview" back to about:flags; enable it by default just once. (Closed) Base URL: svn://chrome-svn/chrome/branches/782/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | chrome/common/pref_names.h » ('j') | 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) 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
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.) 1172 // Disable print preview (Not exposed via about:flags. Only used for testing.)
1174 const char kDisablePrintPreview[] = "disable-print-preview"; 1173 const char kDisablePrintPreview[] = "disable-print-preview";
1175 1174
1176 bool IsPrintPreviewEnabled() {
1177 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisablePrintPreview);
1178 }
1179 #else
1180 // Enable print preview (no PDF viewer, thus not supported with Chromium). 1175 // Enable print preview (no PDF viewer, thus not supported with Chromium).
1176 // kDisablePrintPreview overrides this.
1181 const char kEnablePrintPreview[] = "enable-print-preview"; 1177 const char kEnablePrintPreview[] = "enable-print-preview";
1182 1178
1183 bool IsPrintPreviewEnabled() { 1179 bool IsPrintPreviewEnabled() {
1180 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisablePrintPreview))
1181 return false;
1184 return CommandLine::ForCurrentProcess()->HasSwitch(kEnablePrintPreview); 1182 return CommandLine::ForCurrentProcess()->HasSwitch(kEnablePrintPreview);
1185 } 1183 }
1186 #endif
1187 1184
1188 bool IsInBrowserThumbnailingEnabled() { 1185 bool IsInBrowserThumbnailingEnabled() {
1189 return CommandLine::ForCurrentProcess()->HasSwitch( 1186 return CommandLine::ForCurrentProcess()->HasSwitch(
1190 kEnableInBrowserThumbnailing); 1187 kEnableInBrowserThumbnailing);
1191 } 1188 }
1192 1189
1193 // ----------------------------------------------------------------------------- 1190 // -----------------------------------------------------------------------------
1194 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. 1191 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1195 // 1192 //
1196 // You were going to just dump your switches here, weren't you? Instead, 1193 // 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 1194 // please put them in alphabetical order above, or in order inside the
1198 // appropriate ifdef at the bottom. The order should match the header. 1195 // appropriate ifdef at the bottom. The order should match the header.
1199 // ----------------------------------------------------------------------------- 1196 // -----------------------------------------------------------------------------
1200 1197
1201 } // namespace switches 1198 } // namespace switches
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698