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