content_switches.cc revision c2db58bd994c04d98e4ee2cd7565b71548655fe3
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
3// found in the LICENSE file.
4
5#include "content/public/common/content_switches.h"
6
7namespace switches {
8
9// By default, file:// URIs cannot read other file:// URIs. This is an
10// override for developers who need the old behavior for testing.
11const char kAllowFileAccessFromFiles[]      = "allow-file-access-from-files";
12
13// Enables the sandboxed processes to run without a job object assigned to them.
14// This flag is required to allow Chrome to run in RemoteApps or Citrix. This
15// flag can reduce the security of the sandboxed processes and allow them to do
16// certain API calls like shut down Windows or access the clipboard. Also we
17// lose the chance to kill some processes until the outer job that owns them
18// finishes.
19const char kAllowNoSandboxJob[]             = "allow-no-sandbox-job";
20
21// Allows debugging of sandboxed processes (see zygote_main_linux.cc).
22const char kAllowSandboxDebugging[]         = "allow-sandbox-debugging";
23
24// Allow compositing on chrome:// pages.
25const char kAllowWebUICompositing[]         = "allow-webui-compositing";
26
27// The same as kAuditHandles except all handles are enumerated.
28const char kAuditAllHandles[]               = "enable-handle-auditing-all";
29
30// Enumerates and prints a child process' most dangerous handles when it
31// is terminated.
32const char kAuditHandles[]                  = "enable-handle-auditing";
33
34// Blacklist the GPU for accelerated compositing.
35const char kBlacklistAcceleratedCompositing[] =
36    "blacklist-accelerated-compositing";
37
38// Blacklist the GPU for WebGL.
39const char kBlacklistWebGL[]                = "blacklist-webgl";
40
41// Causes the browser process to throw an assertion on startup.
42const char kBrowserAssertTest[]             = "assert-test";
43
44// Causes the browser process to crash on startup.
45const char kBrowserCrashTest[]              = "crash-test";
46
47// Path to the exe to run for the renderer and plugin subprocesses.
48const char kBrowserSubprocessPath[]         = "browser-subprocess-path";
49
50// Dumps extra logging about plugin loading to the log file.
51const char kDebugPluginLoading[] = "debug-plugin-loading";
52
53// Sets the tile size used by composited layers.
54const char kDefaultTileWidth[]              = "default-tile-width";
55const char kDefaultTileHeight[]             = "default-tile-height";
56
57// Disable antialiasing on 2d canvas.
58const char kDisable2dCanvasAntialiasing[]   = "disable-canvas-aa";
59
60// Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
61// This is controlled by policy and is kept separate from the other
62// enable/disable switches to avoid accidentally regressing the policy
63// support for controlling access to these APIs.
64const char kDisable3DAPIs[]                 = "disable-3d-apis";
65
66// Disable gpu-accelerated 2d canvas.
67const char kDisableAccelerated2dCanvas[]    = "disable-accelerated-2d-canvas";
68
69// Disables accelerated compositing.
70const char kDisableAcceleratedCompositing[] = "disable-accelerated-compositing";
71
72// Disables accelerated compositing for backgrounds of root layers with
73// background-attachment: fixed.
74const char kDisableAcceleratedFixedRootBackground[] =
75    "disable-accelerated-fixed-root-background";
76
77// Disables the hardware acceleration of 3D CSS and animation.
78const char kDisableAcceleratedLayers[]      = "disable-accelerated-layers";
79
80// Disables accelerated compositing for overflow scroll.
81const char kDisableAcceleratedOverflowScroll[] =
82    "disable-accelerated-overflow-scroll";
83
84// Disables the hardware acceleration of plugins.
85const char kDisableAcceleratedPlugins[]     = "disable-accelerated-plugins";
86
87// Disables GPU accelerated video display.
88const char kDisableAcceleratedVideo[]       = "disable-accelerated-video";
89
90// Disables hardware acceleration of video decode, where available.
91const char kDisableAcceleratedVideoDecode[] =
92    "disable-accelerated-video-decode";
93
94// Disables the alternate window station for the renderer.
95const char kDisableAltWinstation[]          = "disable-winsta";
96
97// Disable the ApplicationCache.
98const char kDisableApplicationCache[]       = "disable-application-cache";
99//
100// TODO(scherkus): remove --disable-audio when we have a proper fallback
101// mechanism.
102const char kDisableAudio[]                  = "disable-audio";
103
104// Disable limits on the number of backing stores. Can prevent blinking for
105// users with many windows/tabs and lots of memory.
106const char kDisableBackingStoreLimit[]      = "disable-backing-store-limit";
107
108// Enables browser plugin compositing experiment.
109const char kDisableBrowserPluginCompositing[] =
110    "disable-browser-plugin-compositing";
111
112// See comment for kEnableCompositingForFixedPosition.
113const char kDisableCompositingForFixedPosition[] =
114     "disable-fixed-position-compositing";
115
116// See comment for kEnableCompositingForTransition.
117const char kDisableCompositingForTransition[] =
118     "disable-transition-compositing";
119
120// Disables HTML5 DB support.
121const char kDisableDatabases[]              = "disable-databases";
122
123// Disables delegated renderer.
124const char kDisableDelegatedRenderer[]      = "disable-delegated-renderer";
125
126// Disables desktop notifications (default enabled on windows).
127const char kDisableDesktopNotifications[]   = "disable-desktop-notifications";
128
129// Disables device orientation events.
130const char kDisableDeviceOrientation[]      = "disable-device-orientation";
131
132// Disable experimental WebGL support.
133const char kDisableExperimentalWebGL[]      = "disable-webgl";
134
135// Disable FileSystem API.
136const char kDisableFileSystem[]             = "disable-file-system";
137
138const char kDisableFixedPositionCreatesStackingContext[]
139    = "disable-fixed-position-creates-stacking-context";
140
141// Disable 3D inside of flapper.
142const char kDisableFlash3d[]                = "disable-flash-3d";
143
144// Disable Stage3D inside of flapper.
145const char kDisableFlashStage3d[]           = "disable-flash-stage3d";
146
147// This flag disables force compositing mode and prevents it from being enabled
148// via field trials.
149const char kDisableForceCompositingMode[]   = "disable-force-compositing-mode";
150
151// Disable the JavaScript Full Screen API.
152const char kDisableFullScreen[]             = "disable-fullscreen";
153
154// Suppresses support for the Geolocation javascript API.
155const char kDisableGeolocation[]            = "disable-geolocation";
156
157const char kDisableGestureTapHighlight[]    = "disable-gesture-tap-highlight";
158
159// Disable GL multisampling.
160const char kDisableGLMultisampling[]        = "disable-gl-multisampling";
161
162// Disables GPU hardware acceleration.  If software renderer is not in place,
163// then the GPU process won't launch.
164const char kDisableGpu[]                    = "disable-gpu";
165
166// Prevent the compositor from using its GPU implementation.
167const char kDisableGpuCompositing[]         = "disable-gpu-compositing";
168
169// Do not launch the GPU process shortly after browser process launch. Instead
170// launch it when it is first needed.
171const char kDisableGpuProcessPrelaunch[]    = "disable-gpu-process-prelaunch";
172
173// Disable the GPU process sandbox.
174const char kDisableGpuSandbox[]             = "disable-gpu-sandbox";
175
176// Disable the thread that crashes the GPU process if it stops responding to
177// messages.
178const char kDisableGpuWatchdog[]            = "disable-gpu-watchdog";
179
180// Suppresses hang monitor dialogs in renderer processes.  This may allow slow
181// unload handlers on a page to prevent the tab from closing, but the Task
182// Manager can be used to terminate the offending process in this case.
183const char kDisableHangMonitor[]            = "disable-hang-monitor";
184
185// Disable the RenderThread's HistogramCustomizer.
186const char kDisableHistogramCustomizer[]    = "disable-histogram-customizer";
187
188// Disables HTML-based desktop notifications.
189const char kDisableHTMLNotifications[]      = "disable-html-notifications";
190
191// Disable the use of an ImageTransportSurface. This means the GPU process
192// will present the rendered page rather than the browser process.
193const char kDisableImageTransportSurface[]  = "disable-image-transport-surface";
194
195// Prevent Java from running.
196const char kDisableJava[]                   = "disable-java";
197
198// Don't execute JavaScript (browser JS like the new tab page still runs).
199const char kDisableJavaScript[]             = "disable-javascript";
200
201// Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
202const char kDisableLegacyEncryptedMedia[] = "disable-legacy-encrypted-media";
203
204// Disable LocalStorage.
205const char kDisableLocalStorage[]           = "disable-local-storage";
206
207// Force logging to be disabled.  Logging is enabled by default in debug
208// builds.
209const char kDisableLogging[]                = "disable-logging";
210
211// Disable Pepper3D.
212const char kDisablePepper3d[]               = "disable-pepper-3d";
213
214// Disables compositor-accelerated touch-screen pinch gestures.
215const char kDisablePinch[]                  = "disable-pinch";
216
217// Prevent plugins from running.
218const char kDisablePlugins[]                = "disable-plugins";
219
220// Disable discovering third-party plug-ins. Effectively loading only
221// ones shipped with the browser plus third-party ones as specified by
222// --extra-plugin-dir and --load-plugin switches.
223const char kDisablePluginsDiscovery[]       = "disable-plugins-discovery";
224
225// Disables remote web font support. SVG font should always work whether this
226// option is specified or not.
227const char kDisableRemoteFonts[]            = "disable-remote-fonts";
228
229// Turns off the accessibility in the renderer.
230const char kDisableRendererAccessibility[]  = "disable-renderer-accessibility";
231
232// Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
233const char kDisableSeccompFilterSandbox[]   = "disable-seccomp-filter-sandbox";
234
235// Disable session storage.
236const char kDisableSessionStorage[]         = "disable-session-storage";
237
238// Disable the setuid sandbox (Linux only).
239const char kDisableSetuidSandbox[]          = "disable-setuid-sandbox";
240
241// Enable shared workers. Functionality not yet complete.
242const char kDisableSharedWorkers[]          = "disable-shared-workers";
243
244// Disables site-specific tailoring to compatibility issues in WebKit.
245const char kDisableSiteSpecificQuirks[]     = "disable-site-specific-quirks";
246
247// Disable smooth scrolling for testing.
248const char kDisableSmoothScrolling[]        = "disable-smooth-scrolling";
249
250// Disables the use of a 3D software rasterizer.
251const char kDisableSoftwareRasterizer[]     = "disable-software-rasterizer";
252
253// Disables speech input.
254const char kDisableSpeechInput[]            = "disable-speech-input";
255
256// Disable False Start in SSL and TLS connections.
257const char kDisableSSLFalseStart[]          = "disable-ssl-false-start";
258
259// Disable multithreaded GPU compositing of web content.
260const char kDisableThreadedCompositing[]     = "disable-threaded-compositing";
261
262// Disables the threaded HTML parser in WebKit
263const char kDisableThreadedHTMLParser[]     = "disable-threaded-html-parser";
264
265// Disable web audio API.
266const char kDisableWebAudio[]               = "disable-webaudio";
267
268// Disables prefixed Media Source API (i.e., the WebKitMediaSource object).
269const char kDisableWebKitMediaSource[]      = "disable-webkit-media-source";
270
271// Don't enforce the same-origin policy. (Used by people testing their sites.)
272const char kDisableWebSecurity[]            = "disable-web-security";
273
274// Disables WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS.
275const char kDisableXSSAuditor[]             = "disable-xss-auditor";
276
277// Specifies if the |DOMAutomationController| needs to be bound in the
278// renderer. This binding happens on per-frame basis and hence can potentially
279// be a performance bottleneck. One should only enable it when automating dom
280// based tests.
281const char kDomAutomationController[]       = "dom-automation";
282
283// Enable gpu-accelerated SVG/W3C filters.
284const char kEnableAcceleratedFilters[]      = "enable-accelerated-filters";
285
286// Enables accelerated compositing for backgrounds of root layers with
287// background-attachment: fixed. Requires kForceCompositingMode.
288const char kEnableAcceleratedFixedRootBackground[] =
289    "enable-accelerated-fixed-root-background";
290
291// Enables accelerated compositing for overflow scroll. Promotes eligible
292// overflow:scroll elements to layers to enable accelerated scrolling for them.
293const char kEnableAcceleratedOverflowScroll[] =
294    "enable-accelerated-overflow-scroll";
295
296// Enables accelerated compositing for scrollable frames for accelerated
297// scrolling for them. Requires kForceCompositingMode.
298const char kEnableAcceleratedScrollableFrames[] =
299     "enable-accelerated-scrollable-frames";
300
301// Turns on extremely verbose logging of accessibility events.
302const char kEnableAccessibilityLogging[]    = "enable-accessibility-logging";
303
304// Enable notifications of audible/silent audio output from a render view.
305//
306// TODO(miu): Remove --enable-audible-notifications once the feature goes
307// live.  http://crbug.com/178934
308const char kEnableAudibleNotifications[]    = "enable-audible-notifications";
309
310// Use a begin frame signal from browser to renderer to schedule rendering.
311const char kEnableBeginFrameScheduling[]    = "enable-begin-frame-scheduling";
312
313// Synchronize delivery and response of input events to and from the renderer.
314const char kEnableBrowserInputController[]  = "enable-browser-input-controller";
315
316// Enables browser plugin for all types of pages.
317const char kEnableBrowserPluginForAllViewTypes[] =
318    "enable-browser-plugin-for-all-view-types";
319
320// Enables Drag and Drop into and out of Browser Plugin.
321// kEnableBrowserPluginGuestViews must also be set at this time.
322const char kEnableBrowserPluginDragDrop[]   = "enable-browser-plugin-drag-drop";
323
324// Enables accelerated scrolling by the compositor for frames. Requires
325// kForceCompositingMode and kEnableAcceleratedScrollableFrames.
326const char kEnableCompositedScrollingForFrames[] =
327     "enable-composited-scrolling-for-frames";
328
329// Enable the creation of compositing layers for fixed position
330// elements. Three options are needed to support four possible scenarios:
331//  1. Default (disabled)
332//  2. Enabled always (to allow dogfooding)
333//  3. Disabled always (to give safety fallback for users)
334//  4. Enabled only if we detect a highDPI display
335//
336// Option #4 may soon be the default, because the feature is needed soon for
337// high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will
338// override Option #4.
339const char kEnableCompositingForFixedPosition[] =
340     "enable-fixed-position-compositing";
341
342// Enable/Disable the creation of compositing layers for RenderLayers with a
343// transition on a property that supports accelerated animation (that is,
344// opacity, -webkit-transform, and -webkit-filter), even when no animation is
345// running. These options allow for three possible scenarios:
346//  1. Default (enabled only if we dectect a highDPI display)
347//  2. Enabled always.
348//  3. Disabled always.
349const char kEnableCompositingForTransition[] =
350     "enable-transition-compositing";
351
352// Enables CSS3 custom filters
353const char kEnableCssShaders[]              = "enable-css-shaders";
354
355// Defer image decoding in WebKit until painting.
356const char kEnableDeferredImageDecoding[]   = "enable-deferred-image-decoding";
357
358// Enables delegated renderer.
359const char kEnableDelegatedRenderer[]       = "enable-delegated-renderer";
360
361// Enables device motion events.
362const char kEnableDeviceMotion[]            = "enable-device-motion";
363
364// Enables restarting interrupted downloads.
365const char kEnableDownloadResumption[]      = "enable-download-resumption";
366
367// Enables support for Encrypted Media Extensions (e.g. MediaKeys).
368const char kEnableEncryptedMedia[] = "enable-encrypted-media";
369
370// Enable experimental canvas features, e.g. canvas 2D context attributes
371const char kEnableExperimentalCanvasFeatures[] =
372    "enable-experimental-canvas-features";
373
374// Enables Web Platform features that are in development.
375const char kEnableExperimentalWebPlatformFeatures[] =
376    "enable-experimental-web-platform-features";
377
378// Enable an experimental WebSocket implementation.
379const char kEnableExperimentalWebSocket[]   = "enable-experimental-websocket";
380
381// By default, a page is laid out to fill the entire width of the window.
382// This flag fixes the layout of the page to a default of 980 CSS pixels,
383// or to a specified width and height using --enable-fixed-layout=w,h
384const char kEnableFixedLayout[]             = "enable-fixed-layout";
385
386const char kEnableFixedPositionCreatesStackingContext[]
387    = "enable-fixed-position-creates-stacking-context";
388
389// Enable Gesture Tap Highlight
390const char kEnableGestureTapHighlight[]     = "enable-gesture-tap-highlight";
391
392// Enables the GPU benchmarking extension
393const char kEnableGpuBenchmarking[]         = "enable-gpu-benchmarking";
394
395// Enables TRACE for GL calls in the renderer.
396const char kEnableGpuClientTracing[]        = "enable-gpu-client-tracing";
397
398// See comment for kEnableCompositingForFixedPosition.
399const char kEnableHighDpiCompositingForFixedPosition[] =
400     "enable-high-dpi-fixed-position-compositing";
401
402// Enable HTML Imports
403extern const char kEnableHTMLImports[]      = "enable-html-imports";
404
405// Enables support for inband text tracks in media content.
406const char kEnableInbandTextTracks[]        = "enable-inband-text-tracks";
407
408// Force logging to be enabled.  Logging is disabled by default in release
409// builds.
410const char kEnableLogging[]                 = "enable-logging";
411
412// Enables the memory benchmarking extension
413const char kEnableMemoryBenchmarking[]      = "enable-memory-benchmarking";
414
415// On Windows, converts the page to the currently-installed monitor profile.
416// This does NOT enable color management for images. The source is still
417// assumed to be sRGB.
418const char kEnableMonitorProfile[]          = "enable-monitor-profile";
419
420// Enables the new chrome://media-internals page.
421// http://crbug.com/260005
422const char kEnableNewMediaInternals[]       = "enable-new-media-internals";
423
424// Enables use of cache if offline, even if it's stale
425const char kEnableOfflineCacheAccess[]      = "enable-offline-cache-access";
426
427// Enables overlay scrollbars on Aura or Linux. Does nothing on Mac.
428const char kEnableOverlayScrollbars[]       = "enable-overlay-scrollbars";
429
430// Forward overscroll event data from the renderer to the browser.
431const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications";
432
433// Enables compositor-accelerated touch-screen pinch gestures.
434const char kEnablePinch[]                   = "enable-pinch";
435
436// Enable caching of pre-parsed JS script data.  See http://crbug.com/32407.
437const char kEnablePreparsedJsCaching[]      = "enable-preparsed-js-caching";
438
439// Enable privileged WebGL extensions; without this switch such extensions are
440// available only to Chrome extensions.
441const char kEnablePrivilegedWebGLExtensions[] =
442    "enable-privileged-webgl-extensions";
443
444// Aggressively free GPU command buffers belonging to hidden tabs.
445const char kEnablePruneGpuCommandBuffers[] =
446    "enable-prune-gpu-command-buffers";
447
448// Enables the CSS multicol implementation that uses the regions implementation.
449const char kEnableRegionBasedColumns[] =
450    "enable-region-based-columns";
451
452// Cause the OS X sandbox write to syslog every time an access to a resource
453// is denied by the sandbox.
454const char kEnableSandboxLogging[]          = "enable-sandbox-logging";
455
456// Enables the Skia benchmarking extension
457const char kEnableSkiaBenchmarking[]        = "enable-skia-benchmarking";
458
459// On platforms that support it, enables smooth scroll animation.
460const char kEnableSmoothScrolling[]         = "enable-smooth-scrolling";
461
462// Allow the compositor to use its software implementation if GL fails.
463const char kEnableSoftwareCompositing[]     = "enable-software-compositing";
464
465// Enable spatial navigation
466const char kEnableSpatialNavigation[]       = "enable-spatial-navigation";
467
468// Enables the synthesis part of the Web Speech API.
469const char kEnableSpeechSynthesis[]         = "enable-speech-synthesis";
470
471// Enables TLS cached info extension.
472const char kEnableSSLCachedInfo[]           = "enable-ssl-cached-info";
473
474// Enables StatsTable, logging statistics to a global named shared memory table.
475const char kEnableStatsTable[]              = "enable-stats-table";
476
477// Experimentally ensures that each renderer process:
478// 1) Only handles rendering for pages from a single site, apart from iframes.
479// (Note that a page can reference content from multiple origins due to images,
480// JavaScript files, etc.  Cross-site iframes are also loaded in-process.)
481// 2) Only has authority to see or use cookies for the page's top-level origin.
482// (So if a.com iframes b.com, the b.com network request will be sent without
483// cookies.)
484// This is expected to break compatibility with many pages for now.  Unlike the
485// --site-per-process flag, this allows cross-site iframes, but it blocks all
486// cookies on cross-site requests.
487const char kEnableStrictSiteIsolation[]     = "enable-strict-site-isolation";
488
489// Enable use of experimental TCP sockets API for sending data in the
490// SYN packet.
491const char kEnableTcpFastOpen[]             = "enable-tcp-fastopen";
492
493// Enable Text Service Framework(TSF) for text inputting instead of IMM32. This
494// flag is ignored on Metro environment.
495const char kEnableTextServicesFramework[]   = "enable-text-services-framework";
496
497// Enable multithreaded GPU compositing of web content.
498const char kEnableThreadedCompositing[]     = "enable-threaded-compositing";
499
500// Enable screen capturing support for MediaStream API.
501const char kEnableUserMediaScreenCapturing[] =
502    "enable-usermedia-screen-capturing";
503
504// Enables the use of the viewport meta tag, which allows
505// pages to control aspects of their own layout. This also turns on touch-screen
506// pinch gestures.
507const char kEnableViewport[]                = "enable-viewport";
508
509// Allow GL contexts to be automatically virtualized (shared between command
510// buffer clients) if they are compatible.
511const char kEnableVirtualGLContexts[]       = "enable-virtual-gl-contexts";
512
513// Enables moving cursor by word in visual order.
514const char kEnableVisualWordMovement[]      = "enable-visual-word-movement";
515
516// Enable the Vtune profiler support.
517const char kEnableVtune[]                   = "enable-vtune-support";
518
519// Enable CSS Transitions / Animations on the Web Animations model.
520const char kEnableWebAnimationsCSS[]        = "enable-web-animations-css";
521
522// Enable SVG Animations on the Web Animations model.
523const char kEnableWebAnimationsSVG[]        = "enable-web-animations-svg";
524
525// Enables WebGL extensions not yet approved by the community.
526const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
527
528// Enables Web MIDI API.
529const char kEnableWebMIDI[]                 = "enable-web-midi";
530
531// Enable WebRTC to open TCP server sockets.
532const char kEnableWebRtcTcpServerSocket[]   = "enable-webrtc-tcp-server-socket";
533
534// Enables experimental features for the geolocation API.
535// Current features:
536// - CoreLocation support for Mac OS X 10.6
537const char kExperimentalLocationFeatures[]  = "experimental-location-features";
538
539// Load NPAPI plugins from the specified directory.
540const char kExtraPluginDir[]                = "extra-plugin-dir";
541
542// If accelerated compositing is supported, always enter compositing mode for
543// the base layer even when compositing is not strictly required.
544const char kForceCompositingMode[]          = "force-compositing-mode";
545
546// Some field trials may be randomized in the browser, and the randomly selected
547// outcome needs to be propagated to the renderer. For instance, this is used
548// to modify histograms recorded in the renderer, or to get the renderer to
549// also set of its state (initialize, or not initialize components) to match the
550// experiment(s). The option is also useful for forcing field trials when
551// testing changes locally. The argument is a list of name and value pairs,
552// separated by slashes. See FieldTrialList::CreateTrialsFromString() in
553// field_trial.h for details.
554const char kForceFieldTrials[]              = "force-fieldtrials";
555
556// Force renderer accessibility to be on instead of enabling it on demand when
557// a screen reader is detected. The disable-renderer-accessibility switch
558// overrides this if present.
559const char kForceRendererAccessibility[]    = "force-renderer-accessibility";
560
561// Passes gpu device_id from browser process to GPU process.
562const char kGpuDeviceID[]                   = "gpu-device-id";
563
564// Passes gpu driver_vendor from browser process to GPU process.
565const char kGpuDriverVendor[]               = "gpu-driver-vendor";
566
567// Passes gpu driver_version from browser process to GPU process.
568const char kGpuDriverVersion[]              = "gpu-driver-version";
569
570// Extra command line options for launching the GPU process (normally used
571// for debugging). Use like renderer-cmd-prefix.
572const char kGpuLauncher[]                   = "gpu-launcher";
573
574// Makes this process a GPU sub-process.
575const char kGpuProcess[]                    = "gpu-process";
576
577// Allow shmat system call in GPU sandbox.
578const char kGpuSandboxAllowSysVShm[]        = "gpu-sandbox-allow-sysv-shm";
579
580// Causes the GPU process to display a dialog on launch.
581const char kGpuStartupDialog[]              = "gpu-startup-dialog";
582
583// Passes gpu vendor_id from browser process to GPU process.
584const char kGpuVendorID[]                   = "gpu-vendor-id";
585
586// These mappings only apply to the host resolver.
587const char kHostResolverRules[]             = "host-resolver-rules";
588
589// Ignores certificate-related errors.
590const char kIgnoreCertificateErrors[]       = "ignore-certificate-errors";
591
592// Ignores GPU blacklist.
593const char kIgnoreGpuBlacklist[]            = "ignore-gpu-blacklist";
594
595// Run the GPU process as a thread in the browser process.
596const char kInProcessGPU[]                  = "in-process-gpu";
597
598// Runs plugins inside the renderer process
599const char kInProcessPlugins[]              = "in-process-plugins";
600
601// Specifies the flags passed to JS engine
602const char kJavaScriptFlags[]               = "js-flags";
603
604// Load an NPAPI plugin from the specified path.
605const char kLoadPlugin[]                    = "load-plugin";
606
607// Sets the minimum log level. Valid values are from 0 to 3:
608// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
609const char kLoggingLevel[]                  = "log-level";
610
611// Enables displaying net log events on the command line, or writing the events
612// to a separate file if a file name is given.
613const char kLogNetLog[]                     = "log-net-log";
614
615// Make plugin processes log their sent and received messages to VLOG(1).
616const char kLogPluginMessages[]             = "log-plugin-messages";
617
618// Sets the width and height above which a composited layer will get tiled.
619const char kMaxUntiledLayerHeight[]         = "max-untiled-layer-height";
620const char kMaxUntiledLayerWidth[]          = "max-untiled-layer-width";
621
622// Sample memory usage with high frequency and store the results to the
623// Renderer.Memory histogram. Used in memory tests.
624const char kMemoryMetrics[]                 = "memory-metrics";
625
626// Mutes audio sent to the audio device so it is not audible during
627// automated testing.
628const char kMuteAudio[]                     = "mute-audio";
629
630// Don't send HTTP-Referer headers.
631const char kNoReferrers[]                   = "no-referrers";
632
633// Disables the sandbox for all process types that are normally sandboxed.
634const char kNoSandbox[]                     = "no-sandbox";
635
636// Enables or disables history navigation in response to horizontal overscroll.
637// Set the value to '1' to enable the feature, and set to '0' to disable.
638// Defaults to enabled.
639const char kOverscrollHistoryNavigation[] =
640    "overscroll-history-navigation";
641
642// Specifies a command that should be used to launch the plugin process.  Useful
643// for running the plugin process through purify or quantify.  Ex:
644//   --plugin-launcher="path\to\purify /Run=yes"
645const char kPluginLauncher[]                = "plugin-launcher";
646
647// Tells the plugin process the path of the plugin to load
648const char kPluginPath[]                    = "plugin-path";
649
650// Causes the process to run as a plugin subprocess.
651const char kPluginProcess[]                 = "plugin";
652
653// Causes the plugin process to display a dialog on launch.
654const char kPluginStartupDialog[]           = "plugin-startup-dialog";
655
656// Argument to the process type that indicates a PPAPI broker process type.
657const char kPpapiBrokerProcess[]            = "ppapi-broker";
658
659// "Command-line" arguments for the PPAPI Flash; used for debugging options.
660const char kPpapiFlashArgs[]                = "ppapi-flash-args";
661
662// Runs PPAPI (Pepper) plugins in-process.
663const char kPpapiInProcess[]                = "ppapi-in-process";
664
665// Like kPluginLauncher for PPAPI plugins.
666const char kPpapiPluginLauncher[]           = "ppapi-plugin-launcher";
667
668// Argument to the process type that indicates a PPAPI plugin process type.
669const char kPpapiPluginProcess[]            = "ppapi";
670
671// Causes the PPAPI sub process to display a dialog on launch. Be sure to use
672// --no-sandbox as well or the sandbox won't allow the dialog to display.
673const char kPpapiStartupDialog[]            = "ppapi-startup-dialog";
674
675// Runs a single process for each site (i.e., group of pages from the same
676// registered domain) the user visits.  We default to using a renderer process
677// for each site instance (i.e., group of pages from the same registered
678// domain with script connections to each other).
679const char kProcessPerSite[]                = "process-per-site";
680
681// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
682// renderer process.  We default to using a renderer process for each
683// site instance (i.e., group of pages from the same registered domain with
684// script connections to each other).
685const char kProcessPerTab[]                 = "process-per-tab";
686
687// The value of this switch determines whether the process is started as a
688// renderer or plugin host.  If it's empty, it's the browser.
689const char kProcessType[]                   = "type";
690
691// Reduces the GPU process sandbox to be less strict.
692const char kReduceGpuSandbox[]              = "reduce-gpu-sandbox";
693
694// Register Pepper plugins (see pepper_plugin_registry.cc for its format).
695const char kRegisterPepperPlugins[]         = "register-pepper-plugins";
696
697
698// Enables remote debug over HTTP on the specified port.
699const char kRemoteDebuggingPort[]           = "remote-debugging-port";
700
701// Causes the renderer process to throw an assertion on launch.
702const char kRendererAssertTest[]            = "renderer-assert-test";
703
704// On POSIX only: the contents of this flag are prepended to the renderer
705// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
706const char kRendererCmdPrefix[]             = "renderer-cmd-prefix";
707
708// Causes the process to run as renderer instead of as browser.
709const char kRendererProcess[]               = "renderer";
710
711// Overrides the default/calculated limit to the number of renderer processes.
712// Very high values for this setting can lead to high memory/resource usage
713// or instability.
714const char kRendererProcessLimit[]          = "renderer-process-limit";
715
716// Causes the renderer process to display a dialog on launch.
717const char kRendererStartupDialog[]         = "renderer-startup-dialog";
718
719// Enables or disables scroll end effect in response to vertical overscroll.
720// Set the value to '1' to enable the feature, and set to '0' to disable.
721// Defaults to disabled.
722const char kScrollEndEffect[] = "scroll-end-effect";
723
724// Visibly render a border around paint rects in the web page to help debug
725// and study painting behavior.
726const char kShowPaintRects[]                = "show-paint-rects";
727
728// Map mouse input events into touch gesture events.  Useful for debugging touch
729// gestures without needing a touchscreen.
730const char kSimulateTouchScreenWithMouse[]  =
731    "simulate-touch-screen-with-mouse";
732
733// Runs the renderer and plugins in the same process as the browser
734const char kSingleProcess[]                 = "single-process";
735
736// Experimentally enforces a one-site-per-process security policy.
737// All cross-site navigations force process swaps, and we can restrict a
738// renderer process's access rights based on its site.  For details, see:
739// http://www.chromium.org/developers/design-documents/site-isolation
740//
741// Unlike --enable-strict-site-isolation (which allows cross-site iframes),
742// this flag blocks cross-site documents even in iframes, until out-of-process
743// iframe support is available.  Cross-site network requests do attach the
744// normal set of cookies, but a renderer process is only allowed to view or
745// modify cookies for its own site (via JavaScript).
746// TODO(irobert): Implement the cross-site document blocking in
747// http://crbug.com/159215.
748const char kSitePerProcess[]                = "site-per-process";
749
750// Skip gpu info collection, blacklist loading, and blacklist auto-update
751// scheduling at browser startup time.
752// Therefore, all GPU features are available, and about:gpu page shows empty
753// content. The switch is intended only for tests.
754const char kSkipGpuDataLoading[]            = "skip-gpu-data-loading";
755
756// Specifies the request key for the continuous speech recognition webservice.
757const char kSpeechRecognitionWebserviceKey[] = "speech-service-key";
758
759// Specifies if the |StatsCollectionController| needs to be bound in the
760// renderer. This binding happens on per-frame basis and hence can potentially
761// be a performance bottleneck. One should only enable it when running a test
762// that needs to access the provided statistics.
763const char kStatsCollectionController[] =
764    "enable-stats-collection-bindings";
765
766// Upscale defaults to "good".
767const char kTabCaptureDownscaleQuality[]    = "tab-capture-downscale-quality";
768
769// Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
770// One flag for upscaling, one for downscaling.
771// Upscale defaults to "best".
772const char kTabCaptureUpscaleQuality[]      = "tab-capture-upscale-quality";
773
774// GestureTapDown events are deferred by this many miillseconds before
775// sending them to the renderer.
776const char kTapDownDeferralTimeMs[]         = "tap-down-deferral-time";
777
778// Allows for forcing socket connections to http/https to use fixed ports.
779const char kTestingFixedHttpPort[]          = "testing-fixed-http-port";
780const char kTestingFixedHttpsPort[]         = "testing-fixed-https-port";
781
782// Runs the security test for the renderer sandbox.
783const char kTestSandbox[]                   = "test-sandbox";
784
785// Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
786// specify the specific trace categories to include (e.g.
787// --trace-startup=base,net) otherwise, all events are recorded. Setting this
788// flag results in the first call to BeginTracing() to receive all trace events
789// since startup. In Chrome, you may find --trace-startup-file and
790// --trace-startup-duration to control the auto-saving of the trace (not
791// supported in the base-only TraceLog component).
792const char kTraceStartup[]                  = "trace-startup";
793
794// Sets the time in seconds until startup tracing ends. If omitted a default of
795// 5 seconds is used. Has no effect without --trace-startup, or if
796// --startup-trace-file=none was supplied.
797const char kTraceStartupDuration[]          = "trace-startup-duration";
798
799// If supplied, sets the file which startup tracing will be stored into, if
800// omitted the default will be used "chrometrace.log" in the current directory.
801// Has no effect unless --trace-startup is also supplied.
802// Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
803// As a special case, can be set to 'none' - this disables automatically saving
804// the result to a file and the first manually recorded trace will then receive
805// all events since startup.
806const char kTraceStartupFile[]              = "trace-startup-file";
807
808
809
810// Prioritizes the UI's command stream in the GPU process
811extern const char kUIPrioritizeInGpuProcess[] =
812    "ui-prioritize-in-gpu-process";
813
814// Use fake device for MediaStream to replace actual camera and microphone.
815const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream";
816
817// Bypass the media stream infobar by selecting the default device for media
818// streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
819const char kUseFakeUIForMediaStream[]     = "use-fake-ui-for-media-stream";
820
821// Use hardware gpu, if available, for tests.
822const char kUseGpuInTests[]                 = "use-gpu-in-tests";
823
824// Set when Chromium should use a mobile user agent.
825const char kUseMobileUserAgent[] = "use-mobile-user-agent";
826
827// A string used to override the default user agent with a custom one.
828const char kUserAgent[]                     = "user-agent";
829
830// On POSIX only: the contents of this flag are prepended to the utility
831// process command line. Useful values might be "valgrind" or "xterm -e gdb
832// --args".
833const char kUtilityCmdPrefix[]              = "utility-cmd-prefix";
834
835// Causes the process to run as a utility subprocess.
836const char kUtilityProcess[]                = "utility";
837
838// The utility process is sandboxed, with access to one directory. This flag
839// specifies the directory that can be accessed.
840const char kUtilityProcessAllowedDir[]      = "utility-allowed-dir";
841
842// Allows MDns to access network in sandboxed process.
843const char kUtilityProcessEnableMDns[]      = "utility-enable-mdns";
844
845// Will add kWaitForDebugger to every child processes. If a value is passed, it
846// will be used as a filter to determine if the child process should have the
847// kWaitForDebugger flag passed on or not.
848const char kWaitForDebuggerChildren[]       = "wait-for-debugger-children";
849
850// Choose which logging channels in WebCore to activate.  See
851// Logging.cpp in WebKit's WebCore for a list of available channels.
852const char kWebCoreLogChannels[]            = "webcore-log-channels";
853
854// Causes the process to run as a worker subprocess.
855const char kWorkerProcess[]                 = "worker";
856
857// The prefix used when starting the zygote process. (i.e. 'gdb --args')
858const char kZygoteCmdPrefix[]               = "zygote-cmd-prefix";
859
860// Causes the process to run as a renderer zygote.
861const char kZygoteProcess[]                 = "zygote";
862
863#if defined(ENABLE_WEBRTC)
864// Disable WebRTC device enumeration.
865const char kDisableDeviceEnumeration[]        = "disable-device-enumeration";
866
867// Enable WebRTC DataChannels SCTP wire protocol support.
868const char kEnableSCTPDataChannels[]        = "enable-sctp-data-channels";
869
870// Enables WebRTC AEC recordings.
871const char kEnableWebRtcAecRecordings[]     = "enable-webrtc-aec-recordings";
872
873// Enables HW decode acceleration for WebRTC.
874const char kEnableWebRtcHWDecoding[]        = "enable-webrtc-hw-decoding";
875
876#endif
877
878#if defined(OS_ANDROID)
879// Disables device motion events.
880const char kDisableDeviceMotion[]           = "disable-device-motion";
881
882// Disable user gesture requirement for media playback.
883const char kDisableGestureRequirementForMediaPlayback[] =
884    "disable-gesture-requirement-for-media-playback";
885
886// Disable history logging for media elements.
887const char kDisableMediaHistoryLogging[]    = "disable-media-history";
888
889// Disable overscroll edge effects like those found in Android views.
890const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
891
892// WebRTC is enabled by default on Android.
893const char kDisableWebRTC[]                 = "disable-webrtc";
894
895// Enable the recognition part of the Web Speech API.
896const char kEnableSpeechRecognition[]       = "enable-speech-recognition";
897
898// Don't display any scrollbars. This is useful for Android WebView where
899// the system manages the scrollbars instead.
900const char kHideScrollbars[]                = "hide-scrollbars";
901
902// The telephony region (ISO country code) to use in phone number detection.
903const char kNetworkCountryIso[] = "network-country-iso";
904
905// Enables remote debug over HTTP on the specified socket name.
906const char kRemoteDebuggingSocketName[]     = "remote-debugging-socket-name";
907#endif
908
909#if defined(OS_CHROMEOS)
910// Disables panel fitting (used for mirror mode).
911const char kDisablePanelFitting[]           = "disable-panel-fitting";
912#endif
913
914#if defined(OS_MACOSX) && !defined(OS_IOS)
915const char kDisableCarbonInterposing[]      = "disable-carbon-interposing";
916
917// Disables support for Core Animation plugins. This is triggered when
918// accelerated compositing is disabled. See http://crbug.com/122430 .
919const char kDisableCoreAnimationPlugins[] =
920    "disable-core-animation-plugins";
921
922// Use core animation to draw the RenderWidgetHostView on Mac.
923const char kUseCoreAnimation[]              = "use-core-animation";
924#endif
925
926#if defined(OS_POSIX)
927// Causes the child processes to cleanly exit via calling exit().
928const char kChildCleanExit[]                = "child-clean-exit";
929#endif
930
931#if defined(USE_AURA)
932// Forces usage of the test compositor. Needed to run ui tests on bots.
933extern const char kTestCompositor[]         = "test-compositor";
934#endif
935
936// Don't dump stuff here, follow the same order as the header.
937
938// Allows filters (SkImageFilter objects) to be sent between processes over IPC
939const char kAllowFiltersOverIPC[] = "allow-filters-over-ipc";
940
941}  // namespace switches
942