Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / public / common / content_switches.cc
blobc9d89d655179c3bdb232f6e7866961f08288041e
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.
5 #include "content/public/common/content_switches.h"
7 #include "base/command_line.h"
9 namespace switches {
11 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
12 // have an effect. 0 disables MSAA.
13 const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count";
15 // By default, file:// URIs cannot read other file:// URIs. This is an
16 // override for developers who need the old behavior for testing.
17 const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
19 // Allows frames with an https origin to use WebSockets with an insecure URL
20 // (ws://).
21 const char kAllowInsecureWebSocketFromHttpsOrigin[] =
22 "allow-insecure-websocket-from-https-origin";
24 // Allows loopback interface to be added in network list for peer connection.
25 const char kAllowLoopbackInPeerConnection[] =
26 "allow-loopback-in-peer-connection";
28 // Enables the sandboxed processes to run without a job object assigned to them.
29 // This flag is required to allow Chrome to run in RemoteApps or Citrix. This
30 // flag can reduce the security of the sandboxed processes and allow them to do
31 // certain API calls like shut down Windows or access the clipboard. Also we
32 // lose the chance to kill some processes until the outer job that owns them
33 // finishes.
34 const char kAllowNoSandboxJob[] = "allow-no-sandbox-job";
36 // Allows debugging of sandboxed processes (see zygote_main_linux.cc).
37 const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
39 // The same as kAuditHandles except all handles are enumerated.
40 const char kAuditAllHandles[] = "enable-handle-auditing-all";
42 // Enumerates and prints a child process' most dangerous handles when it
43 // is terminated.
44 const char kAuditHandles[] = "enable-handle-auditing";
46 // Choose which logging channels in blink platform to activate. See
47 // Logging.cpp in blink's Source/platform for a list of available channels.
48 const char kBlinkPlatformLogChannels[] = "blink-platform-log-channels";
50 // Block cross-site documents (i.e., HTML/XML/JSON) from being loaded in
51 // subresources when a document is not supposed to read them. This will later
52 // allow us to block them from the entire renderer process when site isolation
53 // is enabled.
54 const char kBlockCrossSiteDocuments[] = "block-cross-site-documents";
56 // Causes the browser process to throw an assertion on startup.
57 const char kBrowserAssertTest[] = "assert-test";
59 // Causes the browser process to crash on startup.
60 const char kBrowserCrashTest[] = "crash-test";
62 // Path to the exe to run for the renderer and plugin subprocesses.
63 const char kBrowserSubprocessPath[] = "browser-subprocess-path";
65 // Dumps extra logging about plugin loading to the log file.
66 const char kDebugPluginLoading[] = "debug-plugin-loading";
68 // Sets the tile size used by composited layers.
69 const char kDefaultTileWidth[] = "default-tile-width";
70 const char kDefaultTileHeight[] = "default-tile-height";
72 // Disable antialiasing on 2d canvas.
73 const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa";
75 // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
76 // This is controlled by policy and is kept separate from the other
77 // enable/disable switches to avoid accidentally regressing the policy
78 // support for controlling access to these APIs.
79 const char kDisable3DAPIs[] = "disable-3d-apis";
81 // Disable gpu-accelerated 2d canvas.
82 const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
84 // Disables layer squashing.
85 const char kDisableLayerSquashing[] =
86 "disable-layer-squashing";
88 // Disables hardware acceleration of video decode, where available.
89 const char kDisableAcceleratedVideoDecode[] =
90 "disable-accelerated-video-decode";
92 // Disable the ApplicationCache.
93 const char kDisableApplicationCache[] = "disable-application-cache";
95 // Disable limits on the number of backing stores. Can prevent blinking for
96 // users with many windows/tabs and lots of memory.
97 const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
99 // Disable the creation of compositing layers when it would prevent LCD text.
100 const char kDisablePreferCompositingToLCDText[] =
101 "disable-prefer-compositing-to-lcd-text";
103 // See comment for kEnableCompositingForTransition.
104 const char kDisableCompositingForTransition[] =
105 "disable-transition-compositing";
107 // Disables HTML5 DB support.
108 const char kDisableDatabases[] = "disable-databases";
110 // Disables delegated renderer.
111 const char kDisableDelegatedRenderer[] = "disable-delegated-renderer";
113 // Disables desktop notifications (default enabled on windows).
114 const char kDisableDesktopNotifications[] = "disable-desktop-notifications";
116 // Handles URL requests by NPAPI plugins through the renderer.
117 const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests";
119 // Disable the per-domain blocking for 3D APIs after GPU reset.
120 // This switch is intended only for tests.
121 extern const char kDisableDomainBlockingFor3DAPIs[] =
122 "disable-domain-blocking-for-3d-apis";
124 // Disable experimental WebGL support.
125 const char kDisableExperimentalWebGL[] = "disable-webgl";
127 // Disable FileSystem API.
128 const char kDisableFileSystem[] = "disable-file-system";
130 // Disable 3D inside of flapper.
131 const char kDisableFlash3d[] = "disable-flash-3d";
133 // Disable Stage3D inside of flapper.
134 const char kDisableFlashStage3d[] = "disable-flash-stage3d";
136 // Disables GPU hardware acceleration. If software renderer is not in place,
137 // then the GPU process won't launch.
138 const char kDisableGpu[] = "disable-gpu";
140 // Prevent the compositor from using its GPU implementation.
141 const char kDisableGpuCompositing[] = "disable-gpu-compositing";
143 // Disable the limit on the number of times the GPU process may be restarted
144 // This switch is intended only for tests.
145 extern const char kDisableGpuProcessCrashLimit[] =
146 "disable-gpu-process-crash-limit";
148 // Disable GPU rasterization, i.e. rasterize on the CPU only.
149 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
150 const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
152 // When using CPU rasterizing disable low resolution tiling. This uses
153 // less power, particularly during animations, but more white may be seen
154 // during fast scrolling especially on slower devices.
155 const char kDisableLowResTiling[] = "disable-low-res-tiling";
157 // Disable the GPU process sandbox.
158 const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
160 // Disable the thread that crashes the GPU process if it stops responding to
161 // messages.
162 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
164 // Suppresses hang monitor dialogs in renderer processes. This may allow slow
165 // unload handlers on a page to prevent the tab from closing, but the Task
166 // Manager can be used to terminate the offending process in this case.
167 const char kDisableHangMonitor[] = "disable-hang-monitor";
169 // Disable the RenderThread's HistogramCustomizer.
170 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer";
172 // Paint content on the main thread instead of the compositor thread.
173 // Overrides the kEnableImplSidePainting flag.
174 const char kDisableImplSidePainting[] = "disable-impl-side-painting";
176 // Prevent Java from running.
177 const char kDisableJava[] = "disable-java";
179 // Don't execute JavaScript (browser JS like the new tab page still runs).
180 const char kDisableJavaScript[] = "disable-javascript";
182 // Don't kill a child process when it sends a bad IPC message. Apart
183 // from testing, it is a bad idea from a security perspective to enable
184 // this switch.
185 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc";
187 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
188 const char kDisablePrefixedEncryptedMedia[] =
189 "disable-prefixed-encrypted-media";
191 // Disables LCD text.
192 const char kDisableLCDText[] = "disable-lcd-text";
194 // Disables distance field text.
195 const char kDisableDistanceFieldText[] = "disable-distance-field-text";
197 // Disable LocalStorage.
198 const char kDisableLocalStorage[] = "disable-local-storage";
200 // Force logging to be disabled. Logging is enabled by default in debug
201 // builds.
202 const char kDisableLogging[] = "disable-logging";
204 // Disables Media Source API (i.e., the MediaSource object).
205 const char kDisableMediaSource[] = "disable-media-source";
207 // Disable Pepper3D.
208 const char kDisablePepper3d[] = "disable-pepper-3d";
210 // Disables compositor-accelerated touch-screen pinch gestures.
211 const char kDisablePinch[] = "disable-pinch";
213 // Prevent plugins from running.
214 const char kDisablePlugins[] = "disable-plugins";
216 // Disable discovering third-party plug-ins. Effectively loading only
217 // ones shipped with the browser plus third-party ones as specified by
218 // --extra-plugin-dir and --load-plugin switches.
219 const char kDisablePluginsDiscovery[] = "disable-plugins-discovery";
221 // Disables remote web font support. SVG font should always work whether this
222 // option is specified or not.
223 const char kDisableRemoteFonts[] = "disable-remote-fonts";
225 // Turns off the accessibility in the renderer.
226 const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
228 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
229 const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox";
231 // Disable session storage.
232 const char kDisableSessionStorage[] = "disable-session-storage";
234 // Disable the setuid sandbox (Linux only).
235 const char kDisableSetuidSandbox[] = "disable-setuid-sandbox";
237 // Disable shared workers.
238 const char kDisableSharedWorkers[] = "disable-shared-workers";
240 // For tests, disable single thread scheduler and only manually composite.
241 const char kDisableSingleThreadProxyScheduler[] =
242 "disable-single-thread-proxy-scheduler";
244 // Disable smooth scrolling for testing.
245 const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
247 // Disables the use of a 3D software rasterizer.
248 const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
250 // Disable multithreaded GPU compositing of web content.
251 const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
253 // Disable V8 idle notification after commit.
254 // Overrides kEnableV8IdleNotificationAfterCommit.
255 const char kDisableV8IdleNotificationAfterCommit[] =
256 "disable-v8-idle-notification-after-commit";
258 // Don't enforce the same-origin policy. (Used by people testing their sites.)
259 const char kDisableWebSecurity[] = "disable-web-security";
261 // Disables support for XSLT.
262 const char kDisableXSLT[] = "disable-xslt";
264 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
265 const char kDisableXSSAuditor[] = "disable-xss-auditor";
267 // Disable rasterizer that writes directly to GPU memory associated with tiles.
268 // Overrides the kEnableZeroCopy flag.
269 const char kDisableZeroCopy[] = "disable-zero-copy";
271 // Specifies if the |DOMAutomationController| needs to be bound in the
272 // renderer. This binding happens on per-frame basis and hence can potentially
273 // be a performance bottleneck. One should only enable it when automating dom
274 // based tests.
275 const char kDomAutomationController[] = "dom-automation";
277 // Enable bleeding-edge code to make Chrome draw content faster. The changes
278 // behind this path are very likely to break lots of content.
279 // ** DO NOT use this flag unless you know what you are doing. **
280 const char kEnableBleedingEdgeRenderingFastPaths[] =
281 "enable-bleeding-edge-rendering-fast-paths";
283 // Disable deferred image filters.
284 const char kDisableDeferredFilters[] = "disable-deferred-filters";
286 // Enables LCD text.
287 const char kEnableLCDText[] = "enable-lcd-text";
289 // Enables using signed distance fields when rendering text.
290 // Only valid if GPU rasterization is enabled as well.
291 const char kEnableDistanceFieldText[] = "enable-distance-field-text";
293 // Enables experimental feature that maps multiple RenderLayers to
294 // one composited layer to avoid pathological layer counts.
295 const char kEnableLayerSquashing[] =
296 "enable-layer-squashing";
298 // Enable experimental container node culling.
299 const char kEnableContainerCulling[] = "enable-container-culling";
301 // Use a BeginFrame signal from browser to renderer to schedule rendering.
302 const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling";
304 // Enable the creation of compositing layers when it would prevent LCD text.
305 const char kEnablePreferCompositingToLCDText[] =
306 "enable-prefer-compositing-to-lcd-text";
308 // PlzNavigate: Use the experimental browser-side navigation path.
309 const char kEnableBrowserSideNavigation[] = "enable-browser-side-navigation";
311 // Enable/Disable the creation of compositing layers for RenderLayers with a
312 // transition on a property that supports accelerated animation (that is,
313 // opacity, -webkit-transform, and -webkit-filter), even when no animation is
314 // running. These options allow for three possible scenarios:
315 // 1. Default (enabled only if we dectect a highDPI display)
316 // 2. Enabled always.
317 // 3. Disabled always.
318 const char kEnableCompositingForTransition[] =
319 "enable-transition-compositing";
321 // Defer image decoding in WebKit until painting.
322 const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
324 // Enables delegated renderer.
325 const char kEnableDelegatedRenderer[] = "enable-delegated-renderer";
327 // Enables display list based 2d canvas implementation.
328 const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
329 const char kDisableDisplayList2dCanvas[] = "disable-display-list-2d-canvas";
331 // Enables restarting interrupted downloads.
332 const char kEnableDownloadResumption[] = "enable-download-resumption";
334 // Enables support for Encrypted Media Extensions (e.g. MediaKeys).
335 const char kEnableEncryptedMedia[] = "enable-encrypted-media";
337 // Enable experimental canvas features, e.g. canvas 2D context attributes
338 const char kEnableExperimentalCanvasFeatures[] =
339 "enable-experimental-canvas-features";
341 // Enables Web Platform features that are in development.
342 const char kEnableExperimentalWebPlatformFeatures[] =
343 "enable-experimental-web-platform-features";
345 // By default, cookies are not allowed on file://. They are needed for testing,
346 // for example page cycler and layout tests. See bug 1157243.
347 const char kEnableFileCookies[] = "enable-file-cookies";
349 // Enables TRACE for GL calls in the renderer.
350 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
352 // Allow heuristics to determine when a layer tile should be drawn with the
353 // Skia GPU backend. Only valid with GPU accelerated compositing +
354 // impl-side painting.
355 const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
357 // When using CPU rasterizing generate low resolution tiling. Low res
358 // tiles may be displayed during fast scrolls especially on slower devices.
359 const char kEnableLowResTiling[] = "enable-low-res-tiling";
361 // Paint content on the compositor thread instead of the main thread.
362 const char kEnableImplSidePainting[] = "enable-impl-side-painting";
364 // Force logging to be enabled. Logging is disabled by default in release
365 // builds.
366 const char kEnableLogging[] = "enable-logging";
368 // Enables the memory benchmarking extension
369 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking";
371 // Enables the network information API.
372 const char kEnableNetworkInformation[] = "enable-network-information";
374 // Enable rasterizer that writes directly to GPU memory.
375 const char kEnableOneCopy[] = "enable-one-copy";
377 // Enables use of hardware overlay for fullscreen video playback. Android only.
378 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video";
380 // Disables blink subtitle and media control on top of overlay fullscreen video.
381 const char kDisableOverlayFullscreenVideoSubtitle[] =
382 "disable-overlay-fullscreen-video-subtitle";
384 // Forward overscroll event data from the renderer to the browser.
385 const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications";
387 // Enables compositor-accelerated touch-screen pinch gestures.
388 const char kEnablePinch[] = "enable-pinch";
390 // Make the values returned to window.performance.memory more granular and more
391 // up to date in shared worker. Without this flag, the memory information is
392 // still available, but it is bucketized and updated less frequently. This flag
393 // also applys to workers.
394 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
396 // Set options to cache V8 data. (off, preparse data, or code)
397 const char kV8CacheOptions[] = "v8-cache-options";
399 // Enables the CSS multicol implementation that uses the regions implementation.
400 const char kEnableRegionBasedColumns[] =
401 "enable-region-based-columns";
403 // Replaces renderer-browser IPC channel with ChnanelMojo.
404 const char kEnableRendererMojoChannel[] =
405 "enable-renderer-mojo-channel";
407 // Cause the OS X sandbox write to syslog every time an access to a resource
408 // is denied by the sandbox.
409 const char kEnableSandboxLogging[] = "enable-sandbox-logging";
411 // Enables seccomp-bpf support for Android. Requires experimental kernel
412 // support. <http://crbug.com/166704>
413 const char kEnableSeccompFilterSandbox[] =
414 "enable-seccomp-filter-sandbox";
416 // Enables the Skia benchmarking extension
417 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
419 // On platforms that support it, enables smooth scroll animation.
420 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
422 // Enable spatial navigation
423 const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
425 // Enables StatsTable, logging statistics to a global named shared memory table.
426 const char kEnableStatsTable[] = "enable-stats-table";
428 // Experimentally ensures that each renderer process:
429 // 1) Only handles rendering for pages from a single site, apart from iframes.
430 // (Note that a page can reference content from multiple origins due to images,
431 // JavaScript files, etc. Cross-site iframes are also loaded in-process.)
432 // 2) Only has authority to see or use cookies for the page's top-level origin.
433 // (So if a.com iframes b.com, the b.com network request will be sent without
434 // cookies.)
435 // This is expected to break compatibility with many pages for now. Unlike the
436 // --site-per-process flag, this allows cross-site iframes, but it blocks all
437 // cookies on cross-site requests.
438 const char kEnableStrictSiteIsolation[] = "enable-strict-site-isolation";
440 // Enable support for sync events in ServiceWorkers.
441 const char kEnableServiceWorkerSync[] = "enable-service-worker-sync";
443 // Enable use of experimental TCP sockets API for sending data in the
444 // SYN packet.
445 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
447 // Enabled threaded compositing for layout tests.
448 const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
450 // Enable tracing during the execution of browser tests.
451 const char kEnableTracing[] = "enable-tracing";
453 // The filename to write the output of the test tracing to.
454 const char kEnableTracingOutput[] = "enable-tracing-output";
456 // Enable screen capturing support for MediaStream API.
457 const char kEnableUserMediaScreenCapturing[] =
458 "enable-usermedia-screen-capturing";
460 // Enables streaming scripts to V8 while loading.
461 const char kEnableV8ScriptStreaming[] = "enable-v8-script-streaming";
463 // Send a notification from RenderWidgetCompositor to V8 to do idle work
464 // (e.g. garbage collection) after the commit until the beginning of the next
465 // frame. This moves the work off the critical path where compositor is waiting
466 // for the main thread. The flag is experimental until the implementation of the
467 // V8 idle handler is completed.
468 const char kEnableV8IdleNotificationAfterCommit[] =
469 "enable-v8-idle-notification-after-commit";
471 // Enables the use of the @viewport CSS rule, which allows
472 // pages to control aspects of their own layout. This also turns on touch-screen
473 // pinch gestures.
474 const char kEnableViewport[] = "enable-viewport";
476 // Enables the use of the legacy viewport meta tag. Turning this on also
477 // turns on the @viewport CSS rule
478 const char kEnableViewportMeta[] = "enable-viewport-meta";
480 // Resizes of the main frame are the caused by changing between landscape
481 // and portrait mode (i.e. Android) so the page should be rescaled to fit
482 const char kMainFrameResizesAreOrientationChanges[] =
483 "main-frame-resizes-are-orientation-changes";
485 // Enable the Vtune profiler support.
486 const char kEnableVtune[] = "enable-vtune-support";
488 // Enables WebGL extensions not yet approved by the community.
489 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
491 // Enables WebGL rendering into a scanout buffer for overlay support.
492 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
494 // Enables Web MIDI API.
495 const char kEnableWebMIDI[] = "enable-web-midi";
497 // Enable rasterizer that writes directly to GPU memory associated with tiles.
498 const char kEnableZeroCopy[] = "enable-zero-copy";
500 // Load NPAPI plugins from the specified directory.
501 const char kExtraPluginDir[] = "extra-plugin-dir";
503 // Some field trials may be randomized in the browser, and the randomly selected
504 // outcome needs to be propagated to the renderer. For instance, this is used
505 // to modify histograms recorded in the renderer, or to get the renderer to
506 // also set of its state (initialize, or not initialize components) to match the
507 // experiment(s). The option is also useful for forcing field trials when
508 // testing changes locally. The argument is a list of name and value pairs,
509 // separated by slashes. See FieldTrialList::CreateTrialsFromString() in
510 // field_trial.h for details.
511 const char kForceFieldTrials[] = "force-fieldtrials";
513 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
514 // accelerated compositing + impl-side painting. Overrides the
515 // kEnableGpuRasterization flag.
516 const char kForceGpuRasterization[] = "force-gpu-rasterization";
518 // Force renderer accessibility to be on instead of enabling it on demand when
519 // a screen reader is detected. The disable-renderer-accessibility switch
520 // overrides this if present.
521 const char kForceRendererAccessibility[] = "force-renderer-accessibility";
523 // Passes gpu device_id from browser process to GPU process.
524 const char kGpuDeviceID[] = "gpu-device-id";
526 // Passes gpu driver_vendor from browser process to GPU process.
527 const char kGpuDriverVendor[] = "gpu-driver-vendor";
529 // Passes gpu driver_version from browser process to GPU process.
530 const char kGpuDriverVersion[] = "gpu-driver-version";
532 // Extra command line options for launching the GPU process (normally used
533 // for debugging). Use like renderer-cmd-prefix.
534 const char kGpuLauncher[] = "gpu-launcher";
536 // Makes this process a GPU sub-process.
537 const char kGpuProcess[] = "gpu-process";
539 // Allows shmat() system call in the GPU sandbox.
540 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
542 // Makes GPU sandbox failures fatal.
543 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
545 // Starts the GPU sandbox before creating a GL context.
546 const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
548 // Causes the GPU process to display a dialog on launch.
549 const char kGpuStartupDialog[] = "gpu-startup-dialog";
551 // Passes gpu vendor_id from browser process to GPU process.
552 const char kGpuVendorID[] = "gpu-vendor-id";
554 // These mappings only apply to the host resolver.
555 const char kHostResolverRules[] = "host-resolver-rules";
557 // Ignores certificate-related errors.
558 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
560 // Ignores GPU blacklist.
561 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
563 // Run the GPU process as a thread in the browser process.
564 const char kInProcessGPU[] = "in-process-gpu";
566 // Overrides the timeout, in seconds, that a child process waits for a
567 // connection from the browser before killing itself.
568 const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
570 // Specifies the flags passed to JS engine
571 const char kJavaScriptFlags[] = "js-flags";
573 // Load an NPAPI plugin from the specified path.
574 const char kLoadPlugin[] = "load-plugin";
576 // Logs GPU control list decisions when enforcing blacklist rules.
577 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
579 // Sets the minimum log level. Valid values are from 0 to 3:
580 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
581 const char kLoggingLevel[] = "log-level";
583 // Enables saving net log events to a file and sets the file name to use.
584 const char kLogNetLog[] = "log-net-log";
586 // Make plugin processes log their sent and received messages to VLOG(1).
587 const char kLogPluginMessages[] = "log-plugin-messages";
589 // Sets the width and height above which a composited layer will get tiled.
590 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
591 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
593 // Sample memory usage with high frequency and store the results to the
594 // Renderer.Memory histogram. Used in memory tests.
595 const char kMemoryMetrics[] = "memory-metrics";
597 // Mutes audio sent to the audio device so it is not audible during
598 // automated testing.
599 const char kMuteAudio[] = "mute-audio";
601 // Don't send HTTP-Referer headers.
602 const char kNoReferrers[] = "no-referrers";
604 // Disables the sandbox for all process types that are normally sandboxed.
605 const char kNoSandbox[] = "no-sandbox";
607 // Number of worker threads used to rasterize content.
608 const char kNumRasterThreads[] = "num-raster-threads";
610 // Controls the behavior of history navigation in response to horizontal
611 // overscroll.
612 // Set the value to '0' to disable.
613 // Set the value to '1' to enable the behavior where pages slide in and out in
614 // response to the horizontal overscroll gesture and a screenshot of the target
615 // page is shown.
616 // Set the value to '2' to enable the simplified overscroll UI where a
617 // navigation arrow slides in from the side of the screen in response to the
618 // horizontal overscroll gesture.
619 // Defaults to '1'.
620 const char kOverscrollHistoryNavigation[] =
621 "overscroll-history-navigation";
623 // Specifies a command that should be used to launch the plugin process. Useful
624 // for running the plugin process through purify or quantify. Ex:
625 // --plugin-launcher="path\to\purify /Run=yes"
626 const char kPluginLauncher[] = "plugin-launcher";
628 // Tells the plugin process the path of the plugin to load
629 const char kPluginPath[] = "plugin-path";
631 // Causes the process to run as a plugin subprocess.
632 const char kPluginProcess[] = "plugin";
634 // Causes the plugin process to display a dialog on launch.
635 const char kPluginStartupDialog[] = "plugin-startup-dialog";
637 // Argument to the process type that indicates a PPAPI broker process type.
638 const char kPpapiBrokerProcess[] = "ppapi-broker";
640 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
641 const char kPpapiFlashArgs[] = "ppapi-flash-args";
643 // Runs PPAPI (Pepper) plugins in-process.
644 const char kPpapiInProcess[] = "ppapi-in-process";
646 // Like kPluginLauncher for PPAPI plugins.
647 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
649 // Argument to the process type that indicates a PPAPI plugin process type.
650 const char kPpapiPluginProcess[] = "ppapi";
652 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
653 // --no-sandbox as well or the sandbox won't allow the dialog to display.
654 const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
656 // Runs a single process for each site (i.e., group of pages from the same
657 // registered domain) the user visits. We default to using a renderer process
658 // for each site instance (i.e., group of pages from the same registered
659 // domain with script connections to each other).
660 const char kProcessPerSite[] = "process-per-site";
662 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
663 // renderer process. We default to using a renderer process for each
664 // site instance (i.e., group of pages from the same registered domain with
665 // script connections to each other).
666 const char kProcessPerTab[] = "process-per-tab";
668 // The value of this switch determines whether the process is started as a
669 // renderer or plugin host. If it's empty, it's the browser.
670 const char kProcessType[] = "type";
672 // Enables more web features over insecure connections. Designed to be used
673 // for testing purposes only.
674 const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
676 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
677 const char kRegisterPepperPlugins[] = "register-pepper-plugins";
679 // Enables remote debug over HTTP on the specified port.
680 const char kRemoteDebuggingPort[] = "remote-debugging-port";
682 // Causes the renderer process to throw an assertion on launch.
683 const char kRendererAssertTest[] = "renderer-assert-test";
685 // On POSIX only: the contents of this flag are prepended to the renderer
686 // command line. Useful values might be "valgrind" or "xterm -e gdb --args".
687 const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
689 // Causes the process to run as renderer instead of as browser.
690 const char kRendererProcess[] = "renderer";
692 // Overrides the default/calculated limit to the number of renderer processes.
693 // Very high values for this setting can lead to high memory/resource usage
694 // or instability.
695 const char kRendererProcessLimit[] = "renderer-process-limit";
697 // Causes the renderer process to display a dialog on launch.
698 const char kRendererStartupDialog[] = "renderer-startup-dialog";
700 // Causes the process to run as a sandbox IPC subprocess.
701 const char kSandboxIPCProcess[] = "sandbox-ipc";
703 // Enables or disables scroll end effect in response to vertical overscroll.
704 // Set the value to '1' to enable the feature, and set to '0' to disable.
705 // Defaults to disabled.
706 const char kScrollEndEffect[] = "scroll-end-effect";
708 // Visibly render a border around paint rects in the web page to help debug
709 // and study painting behavior.
710 const char kShowPaintRects[] = "show-paint-rects";
712 // Runs the renderer and plugins in the same process as the browser
713 const char kSingleProcess[] = "single-process";
715 // Experimentally enforces a one-site-per-process security policy.
716 // All cross-site navigations force process swaps, and we can restrict a
717 // renderer process's access rights based on its site. For details, see:
718 // http://www.chromium.org/developers/design-documents/site-isolation
720 // Unlike --enable-strict-site-isolation (which allows cross-site iframes),
721 // this flag does not affect which cookies are attached to cross-site requests.
722 // Support is being added to render cross-site iframes in a different process
723 // than their parent pages.
724 const char kSitePerProcess[] = "site-per-process";
726 // Skip gpu info collection, blacklist loading, and blacklist auto-update
727 // scheduling at browser startup time.
728 // Therefore, all GPU features are available, and about:gpu page shows empty
729 // content. The switch is intended only for layout tests.
730 // TODO(gab): Get rid of this switch entirely.
731 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
733 // Specifies if the browser should start in fullscreen mode, like if the user
734 // had pressed F11 right after startup.
735 const char kStartFullscreen[] = "start-fullscreen";
737 // Specifies if the |StatsCollectionController| needs to be bound in the
738 // renderer. This binding happens on per-frame basis and hence can potentially
739 // be a performance bottleneck. One should only enable it when running a test
740 // that needs to access the provided statistics.
741 const char kStatsCollectionController[] =
742 "enable-stats-collection-bindings";
744 // Upscale defaults to "good".
745 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
747 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
748 // One flag for upscaling, one for downscaling.
749 // Upscale defaults to "best".
750 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
752 // Allows for forcing socket connections to http/https to use fixed ports.
753 const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
754 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
756 // Type of the current test harness ("browser" or "ui").
757 const char kTestType[] = "test-type";
759 const char kTouchScrollingMode[] = "touch-scrolling-mode";
760 const char kTouchScrollingModeAsyncTouchmove[] = "async-touchmove";
761 const char kTouchScrollingModeSyncTouchmove[] = "sync-touchmove";
762 const char kTouchScrollingModeTouchcancel[] = "touchcancel";
764 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
765 // can specify the specific trace categories to include (e.g.
766 // --trace-shutdown=base,net) otherwise, all events are recorded.
767 // --trace-shutdown-file can be used to control where the trace log gets stored
768 // to since there is otherwise no way to access the result.
769 const char kTraceShutdown[] = "trace-shutdown";
771 // If supplied, sets the file which shutdown tracing will be stored into, if
772 // omitted the default will be used "chrometrace.log" in the current directory.
773 // Has no effect unless --trace-shutdown is also supplied.
774 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
775 const char kTraceShutdownFile[] = "trace-shutdown-file";
777 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
778 // specify the specific trace categories to include (e.g.
779 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
780 // flag results in the first call to BeginTracing() to receive all trace events
781 // since startup. In Chrome, you may find --trace-startup-file and
782 // --trace-startup-duration to control the auto-saving of the trace (not
783 // supported in the base-only TraceLog component).
784 const char kTraceStartup[] = "trace-startup";
786 // Sets the time in seconds until startup tracing ends. If omitted a default of
787 // 5 seconds is used. Has no effect without --trace-startup, or if
788 // --startup-trace-file=none was supplied.
789 const char kTraceStartupDuration[] = "trace-startup-duration";
791 // If supplied, sets the file which startup tracing will be stored into, if
792 // omitted the default will be used "chrometrace.log" in the current directory.
793 // Has no effect unless --trace-startup is also supplied.
794 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
795 // As a special case, can be set to 'none' - this disables automatically saving
796 // the result to a file and the first manually recorded trace will then receive
797 // all events since startup.
798 const char kTraceStartupFile[] = "trace-startup-file";
800 // Sets the target URL for uploading tracing data.
801 const char kTraceUploadURL[] = "trace-upload-url";
804 // Prioritizes the UI's command stream in the GPU process
805 extern const char kUIPrioritizeInGpuProcess[] =
806 "ui-prioritize-in-gpu-process";
808 // Overrides the preferred discardable memory implementation.
809 const char kUseDiscardableMemory[] = "use-discardable-memory";
811 // Bypass the media stream infobar by selecting the default device for media
812 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
813 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
815 // Set when Chromium should use a mobile user agent.
816 const char kUseMobileUserAgent[] = "use-mobile-user-agent";
818 // Use the new surfaces system to handle compositor delegation.
819 const char kUseSurfaces[] = "use-surfaces";
821 // On POSIX only: the contents of this flag are prepended to the utility
822 // process command line. Useful values might be "valgrind" or "xterm -e gdb
823 // --args".
824 const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
826 // Causes the process to run as a utility subprocess.
827 const char kUtilityProcess[] = "utility";
829 // The utility process is sandboxed, with access to one directory. This flag
830 // specifies the directory that can be accessed.
831 const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
833 // Allows MDns to access network in sandboxed process.
834 const char kUtilityProcessEnableMDns[] = "utility-enable-mdns";
836 const char kUtilityProcessRunningElevated[] = "utility-run-elevated";
838 // In debug builds, asserts that the stream of input events is valid.
839 const char kValidateInputEventStream[] = "validate-input-event-stream";
841 // Will add kWaitForDebugger to every child processes. If a value is passed, it
842 // will be used as a filter to determine if the child process should have the
843 // kWaitForDebugger flag passed on or not.
844 const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
846 // The prefix used when starting the zygote process. (i.e. 'gdb --args')
847 const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
849 // Causes the process to run as a renderer zygote.
850 const char kZygoteProcess[] = "zygote";
852 #if defined(ENABLE_WEBRTC)
853 // Disables audio processing in a MediaStreamTrack. When this flag is on, AEC,
854 // NS and AGC will be done in PeerConnection instead of MediaStreamTrack.
855 const char kDisableAudioTrackProcessing[] = "disable-audio-track-processing";
857 // Disables HW decode acceleration for WebRTC.
858 const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
860 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
861 // ignores this switch on its stable and beta channels.
862 const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
864 // Disables HW encode acceleration for WebRTC.
865 const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
867 // Enables VP8 HW encode acceleration for WebRTC.
868 const char kEnableWebRtcHWVp8Encoding[] = "enable-webrtc-hw-vp8-encoding";
870 // Enables H264 HW encode acceleration for WebRTC.
871 const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
872 #endif
874 #if defined(OS_ANDROID)
875 // Disable user gesture requirement for media playback.
876 const char kDisableGestureRequirementForMediaPlayback[] =
877 "disable-gesture-requirement-for-media-playback";
879 // Disable the click delay by sending click events during double tap.
880 const char kDisableClickDelay[] = "disable-click-delay";
882 // Disable overscroll edge effects like those found in Android views.
883 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
885 // WebRTC is enabled by default on Android.
886 const char kDisableWebRTC[] = "disable-webrtc";
888 // Enable the recognition part of the Web Speech API.
889 const char kEnableSpeechRecognition[] = "enable-speech-recognition";
891 // Always use the video overlay for the embedded video.
892 // This switch is intended only for tests.
893 const char kForceUseOverlayEmbeddedVideo[] = "force-use-overlay-embedded-video";
895 // The telephony region (ISO country code) to use in phone number detection.
896 const char kNetworkCountryIso[] = "network-country-iso";
898 // Enables remote debug over HTTP on the specified socket name.
899 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
901 // Block ChildProcessMain thread of the renderer's ChildProcessService until a
902 // Java debugger is attached.
903 const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
904 #endif
906 // Disable web audio API.
907 const char kDisableWebAudio[] = "disable-webaudio";
909 #if defined(OS_CHROMEOS)
910 // Disables panel fitting (used for mirror mode).
911 const char kDisablePanelFitting[] = "disable-panel-fitting";
913 // Enables VA-API accelerated video encode.
914 const char kDisableVaapiAcceleratedVideoEncode[] =
915 "disable-vaapi-accelerated-video-encode";
916 #endif
918 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
919 // Allows sending text-to-speech requests to speech-dispatcher, a common
920 // Linux speech service. Because it's buggy, the user must explicitly
921 // enable it so that visiting a random webpage can't cause instability.
922 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
923 #endif
925 #if defined(OS_MACOSX) && !defined(OS_IOS)
926 // Disables support for Core Animation plugins. This is triggered when
927 // accelerated compositing is disabled. See http://crbug.com/122430 .
928 const char kDisableCoreAnimationPlugins[] =
929 "disable-core-animation-plugins";
930 #endif
932 #if defined(OS_WIN)
933 // Device scale factor passed to certain processes like renderers, etc.
934 const char kDeviceScaleFactor[] = "device-scale-factor";
936 // Disables the DirectWrite font rendering system on windows.
937 const char kDisableDirectWrite[] = "disable-direct-write";
939 // Disable the Legacy Window which corresponds to the size of the WebContents.
940 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
942 // Enable the Win32K process mitigation policy for renderer processes which
943 // prevents them from invoking user32 and gdi32 system calls which enter
944 // the kernel. This is only supported on Windows 8 and beyond.
945 const char kEnableWin32kRendererLockDown[]
946 = "enable_win32k_renderer_lockdown";
947 #endif
949 // Don't dump stuff here, follow the same order as the header.
951 } // namespace switches