Add missing 'gpu_tests' config to MB, fix typo in MB.
[chromium-blink-merge.git] / content / public / common / content_switches.cc
blobbd75268f7b8d9f7092f9ecbe973729b8706aa2ab
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 namespace switches {
9 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
10 // have an effect. 0 disables MSAA.
11 const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count";
13 // By default, file:// URIs cannot read other file:// URIs. This is an
14 // override for developers who need the old behavior for testing.
15 const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
17 // Allows loopback interface to be added in network list for peer connection.
18 const char kAllowLoopbackInPeerConnection[] =
19 "allow-loopback-in-peer-connection";
21 // Enables the sandboxed processes to run without a job object assigned to them.
22 // This flag is required to allow Chrome to run in RemoteApps or Citrix. This
23 // flag can reduce the security of the sandboxed processes and allow them to do
24 // certain API calls like shut down Windows or access the clipboard. Also we
25 // lose the chance to kill some processes until the outer job that owns them
26 // finishes.
27 const char kAllowNoSandboxJob[] = "allow-no-sandbox-job";
29 // Allows debugging of sandboxed processes (see zygote_main_linux.cc).
30 const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
32 // Choose which logging channels in blink platform to activate. See
33 // Logging.cpp in blink's Source/platform for a list of available channels.
34 const char kBlinkPlatformLogChannels[] = "blink-platform-log-channels";
36 // Set blink settings. Format is <name>[=<value],<name>[=<value>],...
37 // The names are declared in Settings.in. For boolean type, use "true", "false",
38 // or omit '=<value>' part to set to true. For enum type, use the int value of
39 // the enum value. Applied after other command line flags and prefs.
40 const char kBlinkSettings[] = "blink-settings";
42 // Causes the browser process to crash on startup.
43 const char kBrowserCrashTest[] = "crash-test";
45 // Path to the exe to run for the renderer and plugin subprocesses.
46 const char kBrowserSubprocessPath[] = "browser-subprocess-path";
48 // Dumps extra logging about plugin loading to the log file.
49 const char kDebugPluginLoading[] = "debug-plugin-loading";
51 // Sets the tile size used by composited layers.
52 const char kDefaultTileWidth[] = "default-tile-width";
53 const char kDefaultTileHeight[] = "default-tile-height";
55 // Disable antialiasing on 2d canvas.
56 const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa";
58 // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
59 // This is controlled by policy and is kept separate from the other
60 // enable/disable switches to avoid accidentally regressing the policy
61 // support for controlling access to these APIs.
62 const char kDisable3DAPIs[] = "disable-3d-apis";
64 // Disable gpu-accelerated 2d canvas.
65 const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
67 // Disable hardware acceleration of mjpeg decode for captured frame, where
68 // available.
69 const char kDisableAcceleratedMjpegDecode[] =
70 "disable-accelerated-mjpeg-decode";
72 // Disables hardware acceleration of video decode, where available.
73 const char kDisableAcceleratedVideoDecode[] =
74 "disable-accelerated-video-decode";
76 // Disable limits on the number of backing stores. Can prevent blinking for
77 // users with many windows/tabs and lots of memory.
78 const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
80 // Disable one or more Blink runtime-enabled features.
81 // Use names from RuntimeEnabledFeatures.in, separated by commas.
82 // Applied after kEnableBlinkFeatures, and after other flags that change these
83 // features.
84 const char kDisableBlinkFeatures[] = "disable-blink-features";
86 // Disable the creation of compositing layers when it would prevent LCD text.
87 const char kDisablePreferCompositingToLCDText[] =
88 "disable-prefer-compositing-to-lcd-text";
90 // Disables HTML5 DB support.
91 const char kDisableDatabases[] = "disable-databases";
93 // Disables Delay Agnostic AEC in WebRTC.
94 const char kDisableDelayAgnosticAec[] = "disable-delay-agnostic-aec";
96 // Disables delegated renderer.
97 const char kDisableDelegatedRenderer[] = "disable-delegated-renderer";
99 // Handles URL requests by NPAPI plugins through the renderer.
100 const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests";
102 // Disable the per-domain blocking for 3D APIs after GPU reset.
103 // This switch is intended only for tests.
104 extern const char kDisableDomainBlockingFor3DAPIs[] =
105 "disable-domain-blocking-for-3d-apis";
107 // Disable experimental WebGL support.
108 const char kDisableExperimentalWebGL[] = "disable-webgl";
110 // Disable FileSystem API.
111 const char kDisableFileSystem[] = "disable-file-system";
113 // Disable 3D inside of flapper.
114 const char kDisableFlash3d[] = "disable-flash-3d";
116 // Disable Stage3D inside of flapper.
117 const char kDisableFlashStage3d[] = "disable-flash-stage3d";
119 // Disables GPU hardware acceleration. If software renderer is not in place,
120 // then the GPU process won't launch.
121 const char kDisableGpu[] = "disable-gpu";
123 // Prevent the compositor from using its GPU implementation.
124 const char kDisableGpuCompositing[] = "disable-gpu-compositing";
126 // Disable proactive early init of GPU process.
127 const char kDisableGpuEarlyInit[] = "disable-gpu-early-init";
129 // Disable the limit on the number of times the GPU process may be restarted
130 // This switch is intended only for tests.
131 extern const char kDisableGpuProcessCrashLimit[] =
132 "disable-gpu-process-crash-limit";
134 // Disable GPU rasterization, i.e. rasterize on the CPU only.
135 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
136 const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
138 // When using CPU rasterizing disable low resolution tiling. This uses
139 // less power, particularly during animations, but more white may be seen
140 // during fast scrolling especially on slower devices.
141 const char kDisableLowResTiling[] = "disable-low-res-tiling";
143 // Disable the GPU process sandbox.
144 const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
146 // Disable the thread that crashes the GPU process if it stops responding to
147 // messages.
148 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
150 // Suppresses hang monitor dialogs in renderer processes. This may allow slow
151 // unload handlers on a page to prevent the tab from closing, but the Task
152 // Manager can be used to terminate the offending process in this case.
153 const char kDisableHangMonitor[] = "disable-hang-monitor";
155 // Disable hiding the close buttons of inactive tabs when the tabstrip is in
156 // stacked mode.
157 const char kDisableHideInactiveStackedTabCloseButtons[] =
158 "disable-hide-inactive-stacked-tab-close-buttons";
160 // Disable the RenderThread's HistogramCustomizer.
161 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer";
163 // Prevent Java from running.
164 const char kDisableJava[] = "disable-java";
166 // Don't kill a child process when it sends a bad IPC message. Apart
167 // from testing, it is a bad idea from a security perspective to enable
168 // this switch.
169 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc";
171 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
172 const char kDisablePrefixedEncryptedMedia[] =
173 "disable-prefixed-encrypted-media";
175 // Disables LCD text.
176 const char kDisableLCDText[] = "disable-lcd-text";
178 // Disables distance field text.
179 const char kDisableDistanceFieldText[] = "disable-distance-field-text";
181 // Disable LocalStorage.
182 const char kDisableLocalStorage[] = "disable-local-storage";
184 // Force logging to be disabled. Logging is enabled by default in debug
185 // builds.
186 const char kDisableLogging[] = "disable-logging";
188 // Disables Media Source API (i.e., the MediaSource object).
189 const char kDisableMediaSource[] = "disable-media-source";
191 // Disables usage of the namespace sandbox.
192 const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox";
194 // Disables native GPU memory buffer support.
195 const char kDisableNativeGpuMemoryBuffers[] =
196 "disable-native-gpu-memory-buffers";
198 // Disables the Web Notification and the Push APIs.
199 const char kDisableNotifications[] = "disable-notifications";
201 // Disable rasterizer that writes directly to GPU memory.
202 // Overrides the kEnableOneCopy flag.
203 const char kDisableOneCopy[] = "disable-one-copy";
205 // Disable Pepper3D.
206 const char kDisablePepper3d[] = "disable-pepper-3d";
208 // Disables the Permissions API.
209 const char kDisablePermissionsAPI[] = "disable-permissions-api";
211 // Disables compositor-accelerated touch-screen pinch gestures.
212 const char kDisablePinch[] = "disable-pinch";
214 // Disable discovering third-party plugins. Effectively loading only
215 // ones shipped with the browser plus third-party ones as specified by
216 // --extra-plugin-dir and --load-plugin switches.
217 const char kDisablePluginsDiscovery[] = "disable-plugins-discovery";
219 // Taints all <canvas> elements, regardless of origin.
220 const char kDisableReadingFromCanvas[] = "disable-reading-from-canvas";
222 // Disables remote web font support. SVG font should always work whether this
223 // option is specified or not.
224 const char kDisableRemoteFonts[] = "disable-remote-fonts";
226 // Turns off the accessibility in the renderer.
227 const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
229 // Prevent renderer process backgrounding when set.
230 const char kDisableRendererBackgrounding[] = "disable-renderer-backgrounding";
232 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
233 const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox";
235 // Disable the setuid sandbox (Linux only).
236 const char kDisableSetuidSandbox[] = "disable-setuid-sandbox";
238 // Disable shared workers.
239 const char kDisableSharedWorkers[] = "disable-shared-workers";
241 // Disables slimming paint: http://www.chromium.org/blink/slimming-paint
242 // Can be overridden by kEnableSlimmingPaint.
243 const char kDisableSlimmingPaint[] = "disable-slimming-paint";
245 // Disable smooth scrolling for testing.
246 const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
248 // Disables the use of a 3D software rasterizer.
249 const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
251 // Disables the Web Speech API.
252 const char kDisableSpeechAPI[] = "disable-speech-api";
254 // Disables SVG 1.1 DOM.
255 const char kDisableSVG1DOM[] = "disable-svg1dom";
257 // Disable text blob rendering.
258 const char kDisableTextBlobs[] = "disable-text-blobs";
260 // Disable multithreaded GPU compositing of web content.
261 const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
263 // Disable multithreaded, compositor scrolling of web content.
264 const char kDisableThreadedScrolling[] = "disable-threaded-scrolling";
266 // Disable V8 idle tasks.
267 const char kDisableV8IdleTasks[] = "disable-v8-idle-tasks";
269 // Don't enforce the same-origin policy. (Used by people testing their sites.)
270 const char kDisableWebSecurity[] = "disable-web-security";
272 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
273 const char kDisableXSSAuditor[] = "disable-xss-auditor";
275 // Specifies if the |DOMAutomationController| needs to be bound in the
276 // renderer. This binding happens on per-frame basis and hence can potentially
277 // be a performance bottleneck. One should only enable it when automating dom
278 // based tests.
279 const char kDomAutomationController[] = "dom-automation";
281 // Enable antialiasing on 2d canvas clips (as opposed to draw operations)
282 const char kEnable2dCanvasClipAntialiasing[] = "enable-2d-canvas-clip-aa";
284 // Disable partially decoding jpeg images using the GPU.
285 // At least YUV decoding will be accelerated when not using this flag.
286 // Has no effect unless GPU rasterization is enabled.
287 const char kDisableAcceleratedJpegDecoding[] =
288 "disable-accelerated-jpeg-decoding";
290 // Enable bleeding-edge code to make Chrome draw content faster. The changes
291 // behind this path are very likely to break lots of content.
292 // ** DO NOT use this flag unless you know what you are doing. **
293 const char kEnableBleedingEdgeRenderingFastPaths[] =
294 "enable-bleeding-edge-rendering-fast-paths";
296 // Enables new cc/animation system (Project Heaviside). crbug.com/394772
297 const char kEnableCompositorAnimationTimelines[] =
298 "enable-compositor-animation-timelines";
300 // Enables LCD text.
301 const char kEnableLCDText[] = "enable-lcd-text";
303 // Enables using signed distance fields when rendering text.
304 // Only valid if GPU rasterization is enabled as well.
305 const char kEnableDistanceFieldText[] = "enable-distance-field-text";
307 // Enable the experimental Credential Manager JavaScript API.
308 const char kEnableCredentialManagerAPI[] = "enable-credential-manager-api";
310 // Enable the creation of compositing layers when it would prevent LCD text.
311 const char kEnablePreferCompositingToLCDText[] =
312 "enable-prefer-compositing-to-lcd-text";
314 // Disable one or more Blink runtime-enabled features.
315 // Use names from RuntimeEnabledFeatures.in, separated by commas.
316 // Applied before kDisableBlinkFeatures, and after other flags that change these
317 // features.
318 const char kEnableBlinkFeatures[] = "enable-blink-features";
320 // PlzNavigate: Use the experimental browser-side navigation path.
321 const char kEnableBrowserSideNavigation[] = "enable-browser-side-navigation";
323 // Enables Delay Agnostic AEC in WebRTC.
324 const char kEnableDelayAgnosticAec[] = "enable-delay-agnostic-aec";
326 // Enables delegated renderer.
327 const char kEnableDelegatedRenderer[] = "enable-delegated-renderer";
329 // Enables display list based 2d canvas implementation. Options:
330 // 1. Enable: allow browser to use display list for 2d canvas (browser makes
331 // decision).
332 // 2. Force: browser always uses display list for 2d canvas.
333 const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
334 const char kForceDisplayList2dCanvas[] = "force-display-list-2d-canvas";
335 const char kDisableDisplayList2dCanvas[] = "disable-display-list-2d-canvas";
337 // Enables restarting interrupted downloads.
338 const char kEnableDownloadResumption[] = "enable-download-resumption";
340 // Disables (unprefixed) Encrypted Media Extensions.
341 const char kDisableEncryptedMedia[] = "disable-encrypted-media";
343 // Enable experimental canvas features, e.g. canvas 2D context attributes
344 const char kEnableExperimentalCanvasFeatures[] =
345 "enable-experimental-canvas-features";
347 // Enables Web Platform features that are in development.
348 const char kEnableExperimentalWebPlatformFeatures[] =
349 "enable-experimental-web-platform-features";
351 // Enable Web Bluetooth.
352 const char kEnableWebBluetooth[] = "enable-web-bluetooth";
354 // Enables TRACE for GL calls in the renderer.
355 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
357 // Allow heuristics to determine when a layer tile should be drawn with the
358 // Skia GPU backend. Only valid with GPU accelerated compositing +
359 // impl-side painting.
360 const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
362 // When using CPU rasterizing generate low resolution tiling. Low res
363 // tiles may be displayed during fast scrolls especially on slower devices.
364 const char kEnableLowResTiling[] = "enable-low-res-tiling";
366 // Dynamically apply color profiles to web content images.
367 const char kEnableImageColorProfiles[] = "enable-image-color-profiles";
369 // Force logging to be enabled. Logging is disabled by default in release
370 // builds.
371 const char kEnableLogging[] = "enable-logging";
373 // Enables the memory benchmarking extension
374 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking";
376 // Enables the network information API.
377 const char kEnableNetworkInformation[] = "enable-network-information";
379 // Enable rasterizer that writes directly to GPU memory.
380 const char kEnableOneCopy[] = "enable-one-copy";
382 // Enables use of hardware overlay for fullscreen video playback. Android only.
383 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video";
385 // Enables compositor-accelerated touch-screen pinch gestures.
386 const char kEnablePinch[] = "enable-pinch";
388 // Enables testing features of the Plugin Placeholder. For internal use only.
389 const char kEnablePluginPlaceholderTesting[] =
390 "enable-plugin-placeholder-testing";
392 // Make the values returned to window.performance.memory more granular and more
393 // up to date in shared worker. Without this flag, the memory information is
394 // still available, but it is bucketized and updated less frequently. This flag
395 // also applys to workers.
396 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
398 // Enables payloads for received push messages when using the W3C Push API.
399 const char kEnablePushMessagePayload[] = "enable-push-message-payload";
401 // Set options to cache V8 data. (off, preparse data, or code)
402 const char kV8CacheOptions[] = "v8-cache-options";
404 // Signals that the V8 natives file has been transfered to the child process
405 // by a file descriptor.
406 const char kV8NativesPassedByFD[] = "v8-natives-passed-by-fd";
408 // Signals that the V8 startup snapshot file has been transfered to the child
409 // process by a file descriptor.
410 const char kV8SnapshotPassedByFD[] = "v8-snapshot-passed-by-fd";
412 // Cause the OS X sandbox write to syslog every time an access to a resource
413 // is denied by the sandbox.
414 const char kEnableSandboxLogging[] = "enable-sandbox-logging";
416 // Enables seccomp-bpf support for Android. Requires experimental kernel
417 // support. <http://crbug.com/166704>
418 const char kEnableSeccompFilterSandbox[] =
419 "enable-seccomp-filter-sandbox";
421 // Enables the Skia benchmarking extension
422 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
424 // Enables slimming paint: http://www.chromium.org/blink/slimming-paint
425 // Overrides kDisableSlimmingPaint if both are present.
426 const char kEnableSlimmingPaint[] = "enable-slimming-paint";
428 // Enables slimming paint phase 2: http://www.chromium.org/blink/slimming-paint
429 const char kEnableSlimmingPaintV2[] = "enable-slimming-paint-v2";
431 // On platforms that support it, enables smooth scroll animation.
432 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
434 // Enable spatial navigation
435 const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
437 // Enables implementation of the Cache-Control: stale-while-revalidate directive
438 // which permits servers to allow the use of stale resources while revalidation
439 // proceeds in the background.
440 const char kEnableStaleWhileRevalidate[] = "enable-stale-while-revalidate";
442 // Enables StatsTable, logging statistics to a global named shared memory table.
443 const char kEnableStatsTable[] = "enable-stats-table";
445 // Blocks all insecure requests from secure contexts, and prevents the user
446 // from overriding that decision.
447 const char kEnableStrictMixedContentChecking[] =
448 "enable-strict-mixed-content-checking";
450 // Blocks insecure usage of number of powerful features (geolocation, for
451 // example) that we haven't yet deprecated for the web at large.
452 const char kEnableStrictPowerfulFeatureRestrictions[] =
453 "enable-strict-powerful-feature-restrictions";
455 // Enable use of experimental TCP sockets API for sending data in the
456 // SYN packet.
457 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
459 // Enabled threaded compositing for layout tests.
460 const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
462 // Enable tracing during the execution of browser tests.
463 const char kEnableTracing[] = "enable-tracing";
465 // The filename to write the output of the test tracing to.
466 const char kEnableTracingOutput[] = "enable-tracing-output";
468 // Enable screen capturing support for MediaStream API.
469 const char kEnableUserMediaScreenCapturing[] =
470 "enable-usermedia-screen-capturing";
472 // Enables the use of the @viewport CSS rule, which allows
473 // pages to control aspects of their own layout. This also turns on touch-screen
474 // pinch gestures.
475 const char kEnableViewport[] = "enable-viewport";
477 // Enables the viewport meta tag, the de facto way to control layout which works
478 // only on mobile browsers.
479 const char kEnableViewportMeta[] = "enable-viewport-meta";
481 // Enables experiment to scroll the inner viewport first in some situations.
482 const char kInvertViewportScrollOrder[] = "invert-viewport-scroll-order";
484 // Enable the Vtune profiler support.
485 const char kEnableVtune[] = "enable-vtune-support";
487 // Enables WebGL extensions not yet approved by the community.
488 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
490 // Enables WebGL rendering into a scanout buffer for overlay support.
491 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
493 // Enables interaction with virtual reality devices.
494 const char kEnableWebVR[] = "enable-webvr";
496 // Enable rasterizer that writes directly to GPU memory associated with tiles.
497 const char kEnableZeroCopy[] = "enable-zero-copy";
499 // Explicitly allows additional ports using a comma-separated list of port
500 // numbers.
501 const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
503 // Load NPAPI plugins from the specified directory.
504 const char kExtraPluginDir[] = "extra-plugin-dir";
506 // This option can be used to force field trials when testing changes locally.
507 // The argument is a list of name and value pairs, separated by slashes. If a
508 // trial name is prefixed with an asterisk, that trial will start activated.
509 // For example, the following argument defines two trials, with the second one
510 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/"
511 // This option is also used by the browser to send the list of trials to
512 // renderers, using the same format. See
513 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
514 const char kForceFieldTrials[] = "force-fieldtrials";
516 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
517 // accelerated compositing + impl-side painting. Overrides the
518 // kEnableGpuRasterization flag.
519 const char kForceGpuRasterization[] = "force-gpu-rasterization";
521 // The number of multisample antialiasing samples for GPU rasterization.
522 // Requires MSAA support on GPU to have an effect. 0 disables MSAA.
523 const char kGpuRasterizationMSAASampleCount[] =
524 "gpu-rasterization-msaa-sample-count";
526 // Force renderer accessibility to be on instead of enabling it on demand when
527 // a screen reader is detected. The disable-renderer-accessibility switch
528 // overrides this if present.
529 const char kForceRendererAccessibility[] = "force-renderer-accessibility";
531 // Passes gpu device_id from browser process to GPU process.
532 const char kGpuDeviceID[] = "gpu-device-id";
534 // Passes gpu driver_vendor from browser process to GPU process.
535 const char kGpuDriverVendor[] = "gpu-driver-vendor";
537 // Passes gpu driver_version from browser process to GPU process.
538 const char kGpuDriverVersion[] = "gpu-driver-version";
540 // Extra command line options for launching the GPU process (normally used
541 // for debugging). Use like renderer-cmd-prefix.
542 const char kGpuLauncher[] = "gpu-launcher";
544 // Makes this process a GPU sub-process.
545 const char kGpuProcess[] = "gpu-process";
547 // Allows shmat() system call in the GPU sandbox.
548 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
550 // Makes GPU sandbox failures fatal.
551 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
553 // Starts the GPU sandbox before creating a GL context.
554 const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
556 // Causes the GPU process to display a dialog on launch.
557 const char kGpuStartupDialog[] = "gpu-startup-dialog";
559 // Passes gpu vendor_id from browser process to GPU process.
560 const char kGpuVendorID[] = "gpu-vendor-id";
562 // These mappings only apply to the host resolver.
563 const char kHostResolverRules[] = "host-resolver-rules";
565 // Ignores certificate-related errors.
566 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
568 // Ignores GPU blacklist.
569 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
571 // Run the GPU process as a thread in the browser process.
572 const char kInProcessGPU[] = "in-process-gpu";
574 // Overrides the timeout, in seconds, that a child process waits for a
575 // connection from the browser before killing itself.
576 const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
578 // Specifies the flags passed to JS engine
579 const char kJavaScriptFlags[] = "js-flags";
581 // Load an NPAPI plugin from the specified path.
582 const char kLoadPlugin[] = "load-plugin";
584 // Logs GPU control list decisions when enforcing blacklist rules.
585 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
587 // Sets the minimum log level. Valid values are from 0 to 3:
588 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
589 const char kLoggingLevel[] = "log-level";
591 // Enables saving net log events to a file and sets the file name to use.
592 const char kLogNetLog[] = "log-net-log";
594 // Make plugin processes log their sent and received messages to VLOG(1).
595 const char kLogPluginMessages[] = "log-plugin-messages";
597 // Resizes of the main frame are caused by changing between landscape and
598 // portrait mode (i.e. Android) so the page should be rescaled to fit.
599 const char kMainFrameResizesAreOrientationChanges[] =
600 "main-frame-resizes-are-orientation-changes";
602 // Sets the width and height above which a composited layer will get tiled.
603 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
604 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
606 // Sample memory usage with high frequency and store the results to the
607 // Renderer.Memory histogram. Used in memory tests.
608 const char kMemoryMetrics[] = "memory-metrics";
610 // Mutes audio sent to the audio device so it is not audible during
611 // automated testing.
612 const char kMuteAudio[] = "mute-audio";
614 // Don't send HTTP-Referer headers.
615 const char kNoReferrers[] = "no-referrers";
617 // Disables the sandbox for all process types that are normally sandboxed.
618 const char kNoSandbox[] = "no-sandbox";
620 // Enables appcontainer/lowbox for renderer on Win8+ platforms.
621 const char kEnableAppContainer[] = "enable-appcontainer";
623 // Number of worker threads used to rasterize content.
624 const char kNumRasterThreads[] = "num-raster-threads";
626 // Override the behavior of plugin throttling for testing.
627 // By default the throttler is only enabled for a hard-coded list of plugins.
628 // Set the value to 'never' to disable throttling.
629 // Set the value to 'ignore-list' to ignore the hard-coded list.
630 // Set the value to 'always' to always throttle every plugin instance.
631 const char kOverridePluginPowerSaverForTesting[] =
632 "override-plugin-power-saver-for-testing";
634 // Controls the behavior of history navigation in response to horizontal
635 // overscroll.
636 // Set the value to '0' to disable.
637 // Set the value to '1' to enable the behavior where pages slide in and out in
638 // response to the horizontal overscroll gesture and a screenshot of the target
639 // page is shown.
640 // Set the value to '2' to enable the simplified overscroll UI where a
641 // navigation arrow slides in from the side of the screen in response to the
642 // horizontal overscroll gesture.
643 // Defaults to '1'.
644 const char kOverscrollHistoryNavigation[] =
645 "overscroll-history-navigation";
647 // Specifies a command that should be used to launch the plugin process. Useful
648 // for running the plugin process through purify or quantify. Ex:
649 // --plugin-launcher="path\to\purify /Run=yes"
650 const char kPluginLauncher[] = "plugin-launcher";
652 // Tells the plugin process the path of the plugin to load
653 const char kPluginPath[] = "plugin-path";
655 // Causes the process to run as a plugin subprocess.
656 const char kPluginProcess[] = "plugin";
658 // Causes the plugin process to display a dialog on launch.
659 const char kPluginStartupDialog[] = "plugin-startup-dialog";
661 // Argument to the process type that indicates a PPAPI broker process type.
662 const char kPpapiBrokerProcess[] = "ppapi-broker";
664 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
665 const char kPpapiFlashArgs[] = "ppapi-flash-args";
667 // Runs PPAPI (Pepper) plugins in-process.
668 const char kPpapiInProcess[] = "ppapi-in-process";
670 // Like kPluginLauncher for PPAPI plugins.
671 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
673 // Argument to the process type that indicates a PPAPI plugin process type.
674 const char kPpapiPluginProcess[] = "ppapi";
676 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
677 // --no-sandbox as well or the sandbox won't allow the dialog to display.
678 const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
680 // Runs a single process for each site (i.e., group of pages from the same
681 // registered domain) the user visits. We default to using a renderer process
682 // for each site instance (i.e., group of pages from the same registered
683 // domain with script connections to each other).
684 const char kProcessPerSite[] = "process-per-site";
686 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
687 // renderer process. We default to using a renderer process for each
688 // site instance (i.e., group of pages from the same registered domain with
689 // script connections to each other).
690 const char kProcessPerTab[] = "process-per-tab";
692 // The value of this switch determines whether the process is started as a
693 // renderer or plugin host. If it's empty, it's the browser.
694 const char kProcessType[] = "type";
696 // Enables more web features over insecure connections. Designed to be used
697 // for testing purposes only.
698 const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
700 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
701 const char kRegisterPepperPlugins[] = "register-pepper-plugins";
703 // Enables remote debug over HTTP on the specified port.
704 const char kRemoteDebuggingPort[] = "remote-debugging-port";
706 // The contents of this flag are prepended to the renderer command line.
707 // Useful values might be "valgrind" or "xterm -e gdb --args".
708 const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
710 // Causes the process to run as renderer instead of as browser.
711 const char kRendererProcess[] = "renderer";
713 // Overrides the default/calculated limit to the number of renderer processes.
714 // Very high values for this setting can lead to high memory/resource usage
715 // or instability.
716 const char kRendererProcessLimit[] = "renderer-process-limit";
718 // Causes the renderer process to display a dialog on launch.
719 const char kRendererStartupDialog[] = "renderer-startup-dialog";
721 // Reduce the default `referer` header's granularity.
722 const char kReducedReferrerGranularity[] =
723 "reduced-referrer-granularity";
725 // Handles frame scrolls via the root RenderLayer instead of the FrameView.
726 const char kRootLayerScrolls[] = "root-layer-scrolls";
728 // Causes the process to run as a sandbox IPC subprocess.
729 const char kSandboxIPCProcess[] = "sandbox-ipc";
731 // Enables or disables scroll end effect in response to vertical overscroll.
732 // Set the value to '1' to enable the feature, and set to '0' to disable.
733 // Defaults to disabled.
734 const char kScrollEndEffect[] = "scroll-end-effect";
736 // Visibly render a border around paint rects in the web page to help debug
737 // and study painting behavior.
738 const char kShowPaintRects[] = "show-paint-rects";
740 // Runs the renderer and plugins in the same process as the browser
741 const char kSingleProcess[] = "single-process";
743 // Enforces a one-site-per-process security policy:
744 // * Each renderer process, for its whole lifetime, is dedicated to rendering
745 // pages for just one site.
746 // * Thus, pages from different sites are never in the same process.
747 // * A renderer process's access rights are restricted based on its site.
748 // * All cross-site navigations force process swaps.
749 // * <iframe>s are rendered out-of-process whenever the src= is cross-site.
751 // More details here:
752 // http://www.chromium.org/developers/design-documents/site-isolation
753 const char kSitePerProcess[] = "site-per-process";
755 // Skip gpu info collection, blacklist loading, and blacklist auto-update
756 // scheduling at browser startup time.
757 // Therefore, all GPU features are available, and about:gpu page shows empty
758 // content. The switch is intended only for layout tests.
759 // TODO(gab): Get rid of this switch entirely.
760 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
762 // Specifies if the browser should start in fullscreen mode, like if the user
763 // had pressed F11 right after startup.
764 const char kStartFullscreen[] = "start-fullscreen";
766 // Specifies if the |StatsCollectionController| needs to be bound in the
767 // renderer. This binding happens on per-frame basis and hence can potentially
768 // be a performance bottleneck. One should only enable it when running a test
769 // that needs to access the provided statistics.
770 const char kStatsCollectionController[] =
771 "enable-stats-collection-bindings";
773 // Upscale defaults to "good".
774 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
776 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
777 // One flag for upscaling, one for downscaling.
778 // Upscale defaults to "best".
779 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
781 // Allows for forcing socket connections to http/https to use fixed ports.
782 const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
783 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
785 // Type of the current test harness ("browser" or "ui").
786 const char kTestType[] = "test-type";
788 // Controls how text selection granularity changes when touch text selection
789 // handles are dragged. Should be "character" or "direction". If not specified,
790 // the platform default is used.
791 const char kTouchTextSelectionStrategy[] = "touch-selection-strategy";
793 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
794 // can specify the specific trace categories to include (e.g.
795 // --trace-shutdown=base,net) otherwise, all events are recorded.
796 // --trace-shutdown-file can be used to control where the trace log gets stored
797 // to since there is otherwise no way to access the result.
798 const char kTraceShutdown[] = "trace-shutdown";
800 // If supplied, sets the file which shutdown tracing will be stored into, if
801 // omitted the default will be used "chrometrace.log" in the current directory.
802 // Has no effect unless --trace-shutdown is also supplied.
803 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
804 const char kTraceShutdownFile[] = "trace-shutdown-file";
806 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
807 // specify the specific trace categories to include (e.g.
808 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
809 // flag results in the first call to BeginTracing() to receive all trace events
810 // since startup. In Chrome, you may find --trace-startup-file and
811 // --trace-startup-duration to control the auto-saving of the trace (not
812 // supported in the base-only TraceLog component).
813 const char kTraceStartup[] = "trace-startup";
815 // Sets the time in seconds until startup tracing ends. If omitted a default of
816 // 5 seconds is used. Has no effect without --trace-startup, or if
817 // --startup-trace-file=none was supplied.
818 const char kTraceStartupDuration[] = "trace-startup-duration";
820 // If supplied, sets the file which startup tracing will be stored into, if
821 // omitted the default will be used "chrometrace.log" in the current directory.
822 // Has no effect unless --trace-startup is also supplied.
823 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
824 // As a special case, can be set to 'none' - this disables automatically saving
825 // the result to a file and the first manually recorded trace will then receive
826 // all events since startup.
827 const char kTraceStartupFile[] = "trace-startup-file";
829 // Sets the target URL for uploading tracing data.
830 const char kTraceUploadURL[] = "trace-upload-url";
833 // Prioritizes the UI's command stream in the GPU process
834 extern const char kUIPrioritizeInGpuProcess[] =
835 "ui-prioritize-in-gpu-process";
837 // Bypass the media stream infobar by selecting the default device for media
838 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
839 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
841 // Enable native GPU memory buffer support when available.
842 const char kEnableNativeGpuMemoryBuffers[] = "enable-native-gpu-memory-buffers";
844 // Texture target for CHROMIUM_image backed content textures.
845 const char kContentImageTextureTarget[] = "content-image-texture-target";
847 // Texture target for CHROMIUM_image backed video frame textures.
848 const char kVideoImageTextureTarget[] = "video-image-texture-target";
850 // Set when Chromium should use a mobile user agent.
851 const char kUseMobileUserAgent[] = "use-mobile-user-agent";
853 // Use normal priority for tile task worker threads. Otherwise they may
854 // be run at background priority on some platforms.
855 const char kUseNormalPriorityForTileTaskWorkerThreads[] =
856 "use-normal-priority-for-tile-task-worker-threads";
858 // Use the new surfaces system to handle compositor delegation.
859 const char kUseSurfaces[] = "use-surfaces";
861 // Disable the use of the new surfaces system to handle compositor delegation.
862 const char kDisableSurfaces[] = "disable-surfaces";
864 // The contents of this flag are prepended to the utility process command line.
865 // Useful values might be "valgrind" or "xterm -e gdb --args".
866 const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
868 // Causes the process to run as a utility subprocess.
869 const char kUtilityProcess[] = "utility";
871 // The utility process is sandboxed, with access to one directory. This flag
872 // specifies the directory that can be accessed.
873 const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
875 // Allows MDns to access network in sandboxed process.
876 const char kUtilityProcessEnableMDns[] = "utility-enable-mdns";
878 const char kUtilityProcessRunningElevated[] = "utility-run-elevated";
880 // In debug builds, asserts that the stream of input events is valid.
881 const char kValidateInputEventStream[] = "validate-input-event-stream";
883 // Will add kWaitForDebugger to every child processes. If a value is passed, it
884 // will be used as a filter to determine if the child process should have the
885 // kWaitForDebugger flag passed on or not.
886 const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
888 // The prefix used when starting the zygote process. (i.e. 'gdb --args')
889 const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
891 // Causes the process to run as a renderer zygote.
892 const char kZygoteProcess[] = "zygote";
894 #if defined(ENABLE_WEBRTC)
895 // Disables HW decode acceleration for WebRTC.
896 const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
898 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
899 // ignores this switch on its stable and beta channels.
900 const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
902 // Disables HW encode acceleration for WebRTC.
903 const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
905 // Enables negotiation of DTLS 1.2 for WebRTC.
906 const char kEnableWebRtcDtls12[] = "enable-webrtc-dtls12";
908 // Enables H264 HW encode acceleration for WebRTC.
909 const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
911 // Enables Origin header in Stun messages for WebRTC.
912 const char kEnableWebRtcStunOrigin[] = "enable-webrtc-stun-origin";
914 // Renderer process parameter for WebRTC Stun probe trial to determine the
915 // interval. Please see SetupStunProbeTrial in
916 // chrome_browser_field_trials_desktop.cc for more detail.
917 const char kWebRtcStunProbeTrialParameter[] = "webrtc-stun-probe-trial";
919 // Override the maximum framerate as can be specified in calls to getUserMedia.
920 // This flag expects a value. Example: --max-gum-fps=17.5
921 const char kWebRtcMaxCaptureFramerate[] = "max-gum-fps";
922 #endif
924 #if defined(OS_ANDROID)
925 // Disable user gesture requirement for media playback.
926 const char kDisableGestureRequirementForMediaPlayback[] =
927 "disable-gesture-requirement-for-media-playback";
929 // Disable the click delay by sending click events during double tap.
930 const char kDisableClickDelay[] = "disable-click-delay";
932 // Disable overscroll edge effects like those found in Android views.
933 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
935 // Disable the pull-to-refresh effect when vertically overscrolling content.
936 const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect";
938 // Disable the locking feature of the screen orientation API.
939 const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
941 // WebRTC is enabled by default on Android.
942 const char kDisableWebRTC[] = "disable-webrtc";
944 // Enable external animation system for Android compositor.
945 // See also kEnableCompositorAnimationTimelines for renderer compositors.
946 const char kEnableAndroidCompositorAnimationTimelines[] =
947 "enable-android-compositor-animation-timelines";
949 // Enable drag manipulation of longpress-triggered text selections.
950 const char kEnableLongpressDragSelection[] = "enable-longpress-drag-selection";
952 // The telephony region (ISO country code) to use in phone number detection.
953 const char kNetworkCountryIso[] = "network-country-iso";
955 // Enables remote debug over HTTP on the specified socket name.
956 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
958 // Block ChildProcessMain thread of the renderer's ChildProcessService until a
959 // Java debugger is attached.
960 const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
961 #endif
963 // Enable the aggressive flushing of DOM Storage to minimize data loss.
964 const char kEnableAggressiveDOMStorageFlushing[] =
965 "enable-aggressive-domstorage-flushing";
967 // Disable web audio API.
968 const char kDisableWebAudio[] = "disable-webaudio";
970 #if defined(OS_CHROMEOS)
971 // Disables panel fitting (used for mirror mode).
972 const char kDisablePanelFitting[] = "disable-panel-fitting";
974 // Disables VA-API accelerated video encode.
975 const char kDisableVaapiAcceleratedVideoEncode[] =
976 "disable-vaapi-accelerated-video-encode";
977 #endif
979 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
980 // Allows sending text-to-speech requests to speech-dispatcher, a common
981 // Linux speech service. Because it's buggy, the user must explicitly
982 // enable it so that visiting a random webpage can't cause instability.
983 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
984 #endif
986 #if defined(OS_MACOSX) && !defined(OS_IOS)
987 // Disables support for Core Animation plugins. This is triggered when
988 // accelerated compositing is disabled. See http://crbug.com/122430.
989 const char kDisableCoreAnimationPlugins[] =
990 "disable-core-animation-plugins";
991 #endif
993 #if defined(OS_WIN)
994 // Device scale factor passed to certain processes like renderers, etc.
995 const char kDeviceScaleFactor[] = "device-scale-factor";
997 // Disable the Legacy Window which corresponds to the size of the WebContents.
998 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
1000 // Disables the Win32K process mitigation policy for renderer processes.
1001 const char kDisableWin32kRendererLockDown[] =
1002 "disable-win32k-renderer-lockdown";
1004 // Enables experimental hardware acceleration for VP8/VP9 video decoding.
1005 const char kEnableAcceleratedVpxDecode[] = "enable-accelerated-vpx-decode";
1007 // DirectWrite FontCache is shared by browser to renderers using shared memory.
1008 // This switch allows us to pass the shared memory handle to the renderer.
1009 const char kFontCacheSharedHandle[] = "font-cache-shared-handle";
1011 // Sets the free memory thresholds below which the system is considered to be
1012 // under moderate and critical memory pressure. Used in the browser process,
1013 // and ignored if invalid. Specified as a pair of comma separated integers.
1014 // See base/win/memory_pressure_monitor.cc for defaults.
1015 const char kMemoryPressureThresholdsMb[] = "memory-pressure-thresholds-mb";
1017 // Enables the exporting of the tracing events to ETW. This is only supported on
1018 // Windows Vista and later.
1019 const char kTraceExportEventsToETW[] = "trace-export-events-to-etw";
1020 #endif
1022 // Don't dump stuff here, follow the same order as the header.
1024 } // namespace switches