Add window.gc back to Smoothness.WillNavigateToPageHook
[chromium-blink-merge.git] / content / public / common / content_switches.cc
blob5ff58f6c86ee70ae0c0d3be4b81e1cf8bc2716a2
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 multithreaded GPU compositing of web content.
258 const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
260 // Disable multithreaded, compositor scrolling of web content.
261 const char kDisableThreadedScrolling[] = "disable-threaded-scrolling";
263 // Disable V8 idle tasks.
264 const char kDisableV8IdleTasks[] = "disable-v8-idle-tasks";
266 // Don't enforce the same-origin policy. (Used by people testing their sites.)
267 const char kDisableWebSecurity[] = "disable-web-security";
269 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
270 const char kDisableXSSAuditor[] = "disable-xss-auditor";
272 // Specifies if the |DOMAutomationController| needs to be bound in the
273 // renderer. This binding happens on per-frame basis and hence can potentially
274 // be a performance bottleneck. One should only enable it when automating dom
275 // based tests.
276 const char kDomAutomationController[] = "dom-automation";
278 // Enable antialiasing on 2d canvas clips (as opposed to draw operations)
279 const char kEnable2dCanvasClipAntialiasing[] = "enable-2d-canvas-clip-aa";
281 // Disable partially decoding jpeg images using the GPU.
282 // At least YUV decoding will be accelerated when not using this flag.
283 // Has no effect unless GPU rasterization is enabled.
284 const char kDisableAcceleratedJpegDecoding[] =
285 "disable-accelerated-jpeg-decoding";
287 // Enable bleeding-edge code to make Chrome draw content faster. The changes
288 // behind this path are very likely to break lots of content.
289 // ** DO NOT use this flag unless you know what you are doing. **
290 const char kEnableBleedingEdgeRenderingFastPaths[] =
291 "enable-bleeding-edge-rendering-fast-paths";
293 // Enables new cc/animation system (Project Heaviside). crbug.com/394772
294 const char kEnableCompositorAnimationTimelines[] =
295 "enable-compositor-animation-timelines";
297 // Enables LCD text.
298 const char kEnableLCDText[] = "enable-lcd-text";
300 // Enables using signed distance fields when rendering text.
301 // Only valid if GPU rasterization is enabled as well.
302 const char kEnableDistanceFieldText[] = "enable-distance-field-text";
304 // Enable the experimental Credential Manager JavaScript API.
305 const char kEnableCredentialManagerAPI[] = "enable-credential-manager-api";
307 // Enable the creation of compositing layers when it would prevent LCD text.
308 const char kEnablePreferCompositingToLCDText[] =
309 "enable-prefer-compositing-to-lcd-text";
311 // Disable one or more Blink runtime-enabled features.
312 // Use names from RuntimeEnabledFeatures.in, separated by commas.
313 // Applied before kDisableBlinkFeatures, and after other flags that change these
314 // features.
315 const char kEnableBlinkFeatures[] = "enable-blink-features";
317 // PlzNavigate: Use the experimental browser-side navigation path.
318 const char kEnableBrowserSideNavigation[] = "enable-browser-side-navigation";
320 // Enables Delay Agnostic AEC in WebRTC.
321 const char kEnableDelayAgnosticAec[] = "enable-delay-agnostic-aec";
323 // Enables delegated renderer.
324 const char kEnableDelegatedRenderer[] = "enable-delegated-renderer";
326 // Enables display list based 2d canvas implementation. Options:
327 // 1. Enable: allow browser to use display list for 2d canvas (browser makes
328 // decision).
329 // 2. Force: browser always uses display list for 2d canvas.
330 const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
331 const char kForceDisplayList2dCanvas[] = "force-display-list-2d-canvas";
332 const char kDisableDisplayList2dCanvas[] = "disable-display-list-2d-canvas";
334 // Enables restarting interrupted downloads.
335 const char kEnableDownloadResumption[] = "enable-download-resumption";
337 // Disables (unprefixed) Encrypted Media Extensions.
338 const char kDisableEncryptedMedia[] = "disable-encrypted-media";
340 // Enable experimental canvas features, e.g. canvas 2D context attributes
341 const char kEnableExperimentalCanvasFeatures[] =
342 "enable-experimental-canvas-features";
344 // Enables Web Platform features that are in development.
345 const char kEnableExperimentalWebPlatformFeatures[] =
346 "enable-experimental-web-platform-features";
348 // Enable Web Bluetooth.
349 const char kEnableWebBluetooth[] = "enable-web-bluetooth";
351 // Enables TRACE for GL calls in the renderer.
352 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
354 // Allow heuristics to determine when a layer tile should be drawn with the
355 // Skia GPU backend. Only valid with GPU accelerated compositing +
356 // impl-side painting.
357 const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
359 // When using CPU rasterizing generate low resolution tiling. Low res
360 // tiles may be displayed during fast scrolls especially on slower devices.
361 const char kEnableLowResTiling[] = "enable-low-res-tiling";
363 // Dynamically apply color profiles to web content images.
364 const char kEnableImageColorProfiles[] = "enable-image-color-profiles";
366 // Force logging to be enabled. Logging is disabled by default in release
367 // builds.
368 const char kEnableLogging[] = "enable-logging";
370 // Enables the memory benchmarking extension
371 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking";
373 // Enables the network information API.
374 const char kEnableNetworkInformation[] = "enable-network-information";
376 // Enable rasterizer that writes directly to GPU memory.
377 const char kEnableOneCopy[] = "enable-one-copy";
379 // Enables use of hardware overlay for fullscreen video playback. Android only.
380 // TODO(watk): Remove this once blink is updated to pass
381 // kForceOverlayFullscreenVideo for layout tests. http://crbug.com/511376
382 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video";
384 // Enables compositor-accelerated touch-screen pinch gestures.
385 const char kEnablePinch[] = "enable-pinch";
387 // Enables testing features of the Plugin Placeholder. For internal use only.
388 const char kEnablePluginPlaceholderTesting[] =
389 "enable-plugin-placeholder-testing";
391 // Make the values returned to window.performance.memory more granular and more
392 // up to date in shared worker. Without this flag, the memory information is
393 // still available, but it is bucketized and updated less frequently. This flag
394 // also applys to workers.
395 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
397 // Enables payloads for received push messages when using the W3C Push API.
398 const char kEnablePushMessagePayload[] = "enable-push-message-payload";
400 // Set options to cache V8 data. (off, preparse data, or code)
401 const char kV8CacheOptions[] = "v8-cache-options";
403 // Signals that the V8 natives file has been transfered to the child process
404 // by a file descriptor.
405 const char kV8NativesPassedByFD[] = "v8-natives-passed-by-fd";
407 // Signals that the V8 startup snapshot file has been transfered to the child
408 // process by a file descriptor.
409 const char kV8SnapshotPassedByFD[] = "v8-snapshot-passed-by-fd";
411 // Cause the OS X sandbox write to syslog every time an access to a resource
412 // is denied by the sandbox.
413 const char kEnableSandboxLogging[] = "enable-sandbox-logging";
415 // Enables seccomp-bpf support for Android. Requires experimental kernel
416 // support. <http://crbug.com/166704>
417 const char kEnableSeccompFilterSandbox[] =
418 "enable-seccomp-filter-sandbox";
420 // Enables the Skia benchmarking extension
421 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
423 // Enables slimming paint: http://www.chromium.org/blink/slimming-paint
424 // Overrides kDisableSlimmingPaint if both are present.
425 const char kEnableSlimmingPaint[] = "enable-slimming-paint";
427 // Enables slimming paint phase 2: http://www.chromium.org/blink/slimming-paint
428 const char kEnableSlimmingPaintV2[] = "enable-slimming-paint-v2";
430 // On platforms that support it, enables smooth scroll animation.
431 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
433 // Enable spatial navigation
434 const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
436 // Enables implementation of the Cache-Control: stale-while-revalidate directive
437 // which permits servers to allow the use of stale resources while revalidation
438 // proceeds in the background.
439 const char kEnableStaleWhileRevalidate[] = "enable-stale-while-revalidate";
441 // Enables StatsTable, logging statistics to a global named shared memory table.
442 const char kEnableStatsTable[] = "enable-stats-table";
444 // Blocks all insecure requests from secure contexts, and prevents the user
445 // from overriding that decision.
446 const char kEnableStrictMixedContentChecking[] =
447 "enable-strict-mixed-content-checking";
449 // Blocks insecure usage of number of powerful features (geolocation, for
450 // example) that we haven't yet deprecated for the web at large.
451 const char kEnableStrictPowerfulFeatureRestrictions[] =
452 "enable-strict-powerful-feature-restrictions";
454 // Enable use of experimental TCP sockets API for sending data in the
455 // SYN packet.
456 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
458 // Enabled threaded compositing for layout tests.
459 const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
461 // Enable tracing during the execution of browser tests.
462 const char kEnableTracing[] = "enable-tracing";
464 // The filename to write the output of the test tracing to.
465 const char kEnableTracingOutput[] = "enable-tracing-output";
467 // Enable screen capturing support for MediaStream API.
468 const char kEnableUserMediaScreenCapturing[] =
469 "enable-usermedia-screen-capturing";
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 viewport meta tag, the de facto way to control layout which works
477 // only on mobile browsers.
478 const char kEnableViewportMeta[] = "enable-viewport-meta";
480 // Enables experiment to scroll the inner viewport first in some situations.
481 const char kInvertViewportScrollOrder[] = "invert-viewport-scroll-order";
483 // Enable the Vtune profiler support.
484 const char kEnableVtune[] = "enable-vtune-support";
486 // Enables WebGL extensions not yet approved by the community.
487 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
489 // Enables WebGL rendering into a scanout buffer for overlay support.
490 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
492 // Enables interaction with virtual reality devices.
493 const char kEnableWebVR[] = "enable-webvr";
495 // Enable rasterizer that writes directly to GPU memory associated with tiles.
496 const char kEnableZeroCopy[] = "enable-zero-copy";
498 // Explicitly allows additional ports using a comma-separated list of port
499 // numbers.
500 const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
502 // Load NPAPI plugins from the specified directory.
503 const char kExtraPluginDir[] = "extra-plugin-dir";
505 // This option can be used to force field trials when testing changes locally.
506 // The argument is a list of name and value pairs, separated by slashes. If a
507 // trial name is prefixed with an asterisk, that trial will start activated.
508 // For example, the following argument defines two trials, with the second one
509 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/"
510 // This option is also used by the browser to send the list of trials to
511 // renderers, using the same format. See
512 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
513 const char kForceFieldTrials[] = "force-fieldtrials";
515 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
516 // accelerated compositing + impl-side painting. Overrides the
517 // kEnableGpuRasterization flag.
518 const char kForceGpuRasterization[] = "force-gpu-rasterization";
520 // The number of multisample antialiasing samples for GPU rasterization.
521 // Requires MSAA support on GPU to have an effect. 0 disables MSAA.
522 const char kGpuRasterizationMSAASampleCount[] =
523 "gpu-rasterization-msaa-sample-count";
525 // Forces use of hardware overlay for fullscreen video playback. Useful for
526 // testing the Android overlay fullscreen functionality on other platforms.
527 const char kForceOverlayFullscreenVideo[] = "force-overlay-fullscreen-video";
529 // Force renderer accessibility to be on instead of enabling it on demand when
530 // a screen reader is detected. The disable-renderer-accessibility switch
531 // overrides this if present.
532 const char kForceRendererAccessibility[] = "force-renderer-accessibility";
534 // Passes gpu device_id from browser process to GPU process.
535 const char kGpuDeviceID[] = "gpu-device-id";
537 // Passes gpu driver_vendor from browser process to GPU process.
538 const char kGpuDriverVendor[] = "gpu-driver-vendor";
540 // Passes gpu driver_version from browser process to GPU process.
541 const char kGpuDriverVersion[] = "gpu-driver-version";
543 // Extra command line options for launching the GPU process (normally used
544 // for debugging). Use like renderer-cmd-prefix.
545 const char kGpuLauncher[] = "gpu-launcher";
547 // Makes this process a GPU sub-process.
548 const char kGpuProcess[] = "gpu-process";
550 // Allows shmat() system call in the GPU sandbox.
551 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
553 // Makes GPU sandbox failures fatal.
554 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
556 // Starts the GPU sandbox before creating a GL context.
557 const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
559 // Causes the GPU process to display a dialog on launch.
560 const char kGpuStartupDialog[] = "gpu-startup-dialog";
562 // Passes gpu vendor_id from browser process to GPU process.
563 const char kGpuVendorID[] = "gpu-vendor-id";
565 // These mappings only apply to the host resolver.
566 const char kHostResolverRules[] = "host-resolver-rules";
568 // Ignores certificate-related errors.
569 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
571 // Ignores GPU blacklist.
572 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
574 // Run the GPU process as a thread in the browser process.
575 const char kInProcessGPU[] = "in-process-gpu";
577 // Overrides the timeout, in seconds, that a child process waits for a
578 // connection from the browser before killing itself.
579 const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
581 // Specifies the flags passed to JS engine
582 const char kJavaScriptFlags[] = "js-flags";
584 // Load an NPAPI plugin from the specified path.
585 const char kLoadPlugin[] = "load-plugin";
587 // Logs GPU control list decisions when enforcing blacklist rules.
588 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
590 // Sets the minimum log level. Valid values are from 0 to 3:
591 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
592 const char kLoggingLevel[] = "log-level";
594 // Enables saving net log events to a file and sets the file name to use.
595 const char kLogNetLog[] = "log-net-log";
597 // Make plugin processes log their sent and received messages to VLOG(1).
598 const char kLogPluginMessages[] = "log-plugin-messages";
600 // Resizes of the main frame are caused by changing between landscape and
601 // portrait mode (i.e. Android) so the page should be rescaled to fit.
602 const char kMainFrameResizesAreOrientationChanges[] =
603 "main-frame-resizes-are-orientation-changes";
605 // Sets the width and height above which a composited layer will get tiled.
606 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
607 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
609 // Sample memory usage with high frequency and store the results to the
610 // Renderer.Memory histogram. Used in memory tests.
611 const char kMemoryMetrics[] = "memory-metrics";
613 // Mutes audio sent to the audio device so it is not audible during
614 // automated testing.
615 const char kMuteAudio[] = "mute-audio";
617 // Don't send HTTP-Referer headers.
618 const char kNoReferrers[] = "no-referrers";
620 // Disables the sandbox for all process types that are normally sandboxed.
621 const char kNoSandbox[] = "no-sandbox";
623 // Enables appcontainer/lowbox for renderer on Win8+ platforms.
624 const char kEnableAppContainer[] = "enable-appcontainer";
626 // Number of worker threads used to rasterize content.
627 const char kNumRasterThreads[] = "num-raster-threads";
629 // Override the behavior of plugin throttling for testing.
630 // By default the throttler is only enabled for a hard-coded list of plugins.
631 // Set the value to 'never' to disable throttling.
632 // Set the value to 'ignore-list' to ignore the hard-coded list.
633 // Set the value to 'always' to always throttle every plugin instance.
634 const char kOverridePluginPowerSaverForTesting[] =
635 "override-plugin-power-saver-for-testing";
637 // Controls the behavior of history navigation in response to horizontal
638 // overscroll.
639 // Set the value to '0' to disable.
640 // Set the value to '1' to enable the behavior where pages slide in and out in
641 // response to the horizontal overscroll gesture and a screenshot of the target
642 // page is shown.
643 // Set the value to '2' to enable the simplified overscroll UI where a
644 // navigation arrow slides in from the side of the screen in response to the
645 // horizontal overscroll gesture.
646 // Defaults to '1'.
647 const char kOverscrollHistoryNavigation[] =
648 "overscroll-history-navigation";
650 // Specifies a command that should be used to launch the plugin process. Useful
651 // for running the plugin process through purify or quantify. Ex:
652 // --plugin-launcher="path\to\purify /Run=yes"
653 const char kPluginLauncher[] = "plugin-launcher";
655 // Tells the plugin process the path of the plugin to load
656 const char kPluginPath[] = "plugin-path";
658 // Causes the process to run as a plugin subprocess.
659 const char kPluginProcess[] = "plugin";
661 // Causes the plugin process to display a dialog on launch.
662 const char kPluginStartupDialog[] = "plugin-startup-dialog";
664 // Argument to the process type that indicates a PPAPI broker process type.
665 const char kPpapiBrokerProcess[] = "ppapi-broker";
667 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
668 const char kPpapiFlashArgs[] = "ppapi-flash-args";
670 // Runs PPAPI (Pepper) plugins in-process.
671 const char kPpapiInProcess[] = "ppapi-in-process";
673 // Like kPluginLauncher for PPAPI plugins.
674 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
676 // Argument to the process type that indicates a PPAPI plugin process type.
677 const char kPpapiPluginProcess[] = "ppapi";
679 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
680 // --no-sandbox as well or the sandbox won't allow the dialog to display.
681 const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
683 // Runs a single process for each site (i.e., group of pages from the same
684 // registered domain) the user visits. We default to using a renderer process
685 // for each site instance (i.e., group of pages from the same registered
686 // domain with script connections to each other).
687 const char kProcessPerSite[] = "process-per-site";
689 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
690 // renderer process. We default to using a renderer process for each
691 // site instance (i.e., group of pages from the same registered domain with
692 // script connections to each other).
693 const char kProcessPerTab[] = "process-per-tab";
695 // The value of this switch determines whether the process is started as a
696 // renderer or plugin host. If it's empty, it's the browser.
697 const char kProcessType[] = "type";
699 // Enables more web features over insecure connections. Designed to be used
700 // for testing purposes only.
701 const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
703 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
704 const char kRegisterPepperPlugins[] = "register-pepper-plugins";
706 // Enables remote debug over HTTP on the specified port.
707 const char kRemoteDebuggingPort[] = "remote-debugging-port";
709 // The contents of this flag are prepended to the renderer command line.
710 // Useful values might be "valgrind" or "xterm -e gdb --args".
711 const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
713 // Causes the process to run as renderer instead of as browser.
714 const char kRendererProcess[] = "renderer";
716 // Overrides the default/calculated limit to the number of renderer processes.
717 // Very high values for this setting can lead to high memory/resource usage
718 // or instability.
719 const char kRendererProcessLimit[] = "renderer-process-limit";
721 // Causes the renderer process to display a dialog on launch.
722 const char kRendererStartupDialog[] = "renderer-startup-dialog";
724 // Reduce the default `referer` header's granularity.
725 const char kReducedReferrerGranularity[] =
726 "reduced-referrer-granularity";
728 // Handles frame scrolls via the root RenderLayer instead of the FrameView.
729 const char kRootLayerScrolls[] = "root-layer-scrolls";
731 // Causes the process to run as a sandbox IPC subprocess.
732 const char kSandboxIPCProcess[] = "sandbox-ipc";
734 // Enables or disables scroll end effect in response to vertical overscroll.
735 // Set the value to '1' to enable the feature, and set to '0' to disable.
736 // Defaults to disabled.
737 const char kScrollEndEffect[] = "scroll-end-effect";
739 // Visibly render a border around paint rects in the web page to help debug
740 // and study painting behavior.
741 const char kShowPaintRects[] = "show-paint-rects";
743 // Runs the renderer and plugins in the same process as the browser
744 const char kSingleProcess[] = "single-process";
746 // Enforces a one-site-per-process security policy:
747 // * Each renderer process, for its whole lifetime, is dedicated to rendering
748 // pages for just one site.
749 // * Thus, pages from different sites are never in the same process.
750 // * A renderer process's access rights are restricted based on its site.
751 // * All cross-site navigations force process swaps.
752 // * <iframe>s are rendered out-of-process whenever the src= is cross-site.
754 // More details here:
755 // http://www.chromium.org/developers/design-documents/site-isolation
756 const char kSitePerProcess[] = "site-per-process";
758 // Skip gpu info collection, blacklist loading, and blacklist auto-update
759 // scheduling at browser startup time.
760 // Therefore, all GPU features are available, and about:gpu page shows empty
761 // content. The switch is intended only for layout tests.
762 // TODO(gab): Get rid of this switch entirely.
763 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
765 // Specifies if the browser should start in fullscreen mode, like if the user
766 // had pressed F11 right after startup.
767 const char kStartFullscreen[] = "start-fullscreen";
769 // Specifies if the |StatsCollectionController| needs to be bound in the
770 // renderer. This binding happens on per-frame basis and hence can potentially
771 // be a performance bottleneck. One should only enable it when running a test
772 // that needs to access the provided statistics.
773 const char kStatsCollectionController[] =
774 "enable-stats-collection-bindings";
776 // Upscale defaults to "good".
777 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
779 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
780 // One flag for upscaling, one for downscaling.
781 // Upscale defaults to "best".
782 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
784 // Allows for forcing socket connections to http/https to use fixed ports.
785 const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
786 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
788 // Type of the current test harness ("browser" or "ui").
789 const char kTestType[] = "test-type";
791 // Controls how text selection granularity changes when touch text selection
792 // handles are dragged. Should be "character" or "direction". If not specified,
793 // the platform default is used.
794 const char kTouchTextSelectionStrategy[] = "touch-selection-strategy";
796 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
797 // can specify the specific trace categories to include (e.g.
798 // --trace-shutdown=base,net) otherwise, all events are recorded.
799 // --trace-shutdown-file can be used to control where the trace log gets stored
800 // to since there is otherwise no way to access the result.
801 const char kTraceShutdown[] = "trace-shutdown";
803 // If supplied, sets the file which shutdown tracing will be stored into, if
804 // omitted the default will be used "chrometrace.log" in the current directory.
805 // Has no effect unless --trace-shutdown is also supplied.
806 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
807 const char kTraceShutdownFile[] = "trace-shutdown-file";
809 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
810 // specify the specific trace categories to include (e.g.
811 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
812 // flag results in the first call to BeginTracing() to receive all trace events
813 // since startup. In Chrome, you may find --trace-startup-file and
814 // --trace-startup-duration to control the auto-saving of the trace (not
815 // supported in the base-only TraceLog component).
816 const char kTraceStartup[] = "trace-startup";
818 // Sets the time in seconds until startup tracing ends. If omitted a default of
819 // 5 seconds is used. Has no effect without --trace-startup, or if
820 // --startup-trace-file=none was supplied.
821 const char kTraceStartupDuration[] = "trace-startup-duration";
823 // If supplied, sets the file which startup tracing will be stored into, if
824 // omitted the default will be used "chrometrace.log" in the current directory.
825 // Has no effect unless --trace-startup is also supplied.
826 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
827 // As a special case, can be set to 'none' - this disables automatically saving
828 // the result to a file and the first manually recorded trace will then receive
829 // all events since startup.
830 const char kTraceStartupFile[] = "trace-startup-file";
832 // Sets the target URL for uploading tracing data.
833 const char kTraceUploadURL[] = "trace-upload-url";
836 // Prioritizes the UI's command stream in the GPU process
837 extern const char kUIPrioritizeInGpuProcess[] =
838 "ui-prioritize-in-gpu-process";
840 // Bypass the media stream infobar by selecting the default device for media
841 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
842 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
844 // Enable native GPU memory buffer support when available.
845 const char kEnableNativeGpuMemoryBuffers[] = "enable-native-gpu-memory-buffers";
847 // Texture target for CHROMIUM_image backed content textures.
848 const char kContentImageTextureTarget[] = "content-image-texture-target";
850 // Texture target for CHROMIUM_image backed video frame textures.
851 const char kVideoImageTextureTarget[] = "video-image-texture-target";
853 // Set when Chromium should use a mobile user agent.
854 const char kUseMobileUserAgent[] = "use-mobile-user-agent";
856 // Use normal priority for tile task worker threads. Otherwise they may
857 // be run at background priority on some platforms.
858 const char kUseNormalPriorityForTileTaskWorkerThreads[] =
859 "use-normal-priority-for-tile-task-worker-threads";
861 // Use the new surfaces system to handle compositor delegation.
862 const char kUseSurfaces[] = "use-surfaces";
864 // Disable the use of the new surfaces system to handle compositor delegation.
865 const char kDisableSurfaces[] = "disable-surfaces";
867 // The contents of this flag are prepended to the utility process command line.
868 // Useful values might be "valgrind" or "xterm -e gdb --args".
869 const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
871 // Causes the process to run as a utility subprocess.
872 const char kUtilityProcess[] = "utility";
874 // The utility process is sandboxed, with access to one directory. This flag
875 // specifies the directory that can be accessed.
876 const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
878 // Allows MDns to access network in sandboxed process.
879 const char kUtilityProcessEnableMDns[] = "utility-enable-mdns";
881 const char kUtilityProcessRunningElevated[] = "utility-run-elevated";
883 // In debug builds, asserts that the stream of input events is valid.
884 const char kValidateInputEventStream[] = "validate-input-event-stream";
886 // Will add kWaitForDebugger to every child processes. If a value is passed, it
887 // will be used as a filter to determine if the child process should have the
888 // kWaitForDebugger flag passed on or not.
889 const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
891 // The prefix used when starting the zygote process. (i.e. 'gdb --args')
892 const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
894 // Causes the process to run as a renderer zygote.
895 const char kZygoteProcess[] = "zygote";
897 #if defined(ENABLE_WEBRTC)
898 // Disables HW decode acceleration for WebRTC.
899 const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
901 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
902 // ignores this switch on its stable and beta channels.
903 const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
905 // Disables HW encode acceleration for WebRTC.
906 const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
908 // Enables negotiation of DTLS 1.2 for WebRTC.
909 const char kEnableWebRtcDtls12[] = "enable-webrtc-dtls12";
911 // Enables H264 HW encode acceleration for WebRTC.
912 const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
914 // Enables Origin header in Stun messages for WebRTC.
915 const char kEnableWebRtcStunOrigin[] = "enable-webrtc-stun-origin";
917 // Renderer process parameter for WebRTC Stun probe trial to determine the
918 // interval. Please see SetupStunProbeTrial in
919 // chrome_browser_field_trials_desktop.cc for more detail.
920 const char kWebRtcStunProbeTrialParameter[] = "webrtc-stun-probe-trial";
922 // Override the maximum framerate as can be specified in calls to getUserMedia.
923 // This flag expects a value. Example: --max-gum-fps=17.5
924 const char kWebRtcMaxCaptureFramerate[] = "max-gum-fps";
925 #endif
927 #if defined(OS_ANDROID)
928 // Disable user gesture requirement for media playback.
929 const char kDisableGestureRequirementForMediaPlayback[] =
930 "disable-gesture-requirement-for-media-playback";
932 // Disable the click delay by sending click events during double tap.
933 const char kDisableClickDelay[] = "disable-click-delay";
935 // Disable overscroll edge effects like those found in Android views.
936 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
938 // Disable the pull-to-refresh effect when vertically overscrolling content.
939 const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect";
941 // Disable the locking feature of the screen orientation API.
942 const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
944 // WebRTC is enabled by default on Android.
945 const char kDisableWebRTC[] = "disable-webrtc";
947 // Enable external animation system for Android compositor.
948 // See also kEnableCompositorAnimationTimelines for renderer compositors.
949 const char kEnableAndroidCompositorAnimationTimelines[] =
950 "enable-android-compositor-animation-timelines";
952 // Enable drag manipulation of longpress-triggered text selections.
953 const char kEnableLongpressDragSelection[] = "enable-longpress-drag-selection";
955 // The telephony region (ISO country code) to use in phone number detection.
956 const char kNetworkCountryIso[] = "network-country-iso";
958 // Enables remote debug over HTTP on the specified socket name.
959 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
961 // Block ChildProcessMain thread of the renderer's ChildProcessService until a
962 // Java debugger is attached.
963 const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
964 #endif
966 // Enable the aggressive flushing of DOM Storage to minimize data loss.
967 const char kEnableAggressiveDOMStorageFlushing[] =
968 "enable-aggressive-domstorage-flushing";
970 // Disable web audio API.
971 const char kDisableWebAudio[] = "disable-webaudio";
973 #if defined(OS_CHROMEOS)
974 // Disables panel fitting (used for mirror mode).
975 const char kDisablePanelFitting[] = "disable-panel-fitting";
977 // Disables VA-API accelerated video encode.
978 const char kDisableVaapiAcceleratedVideoEncode[] =
979 "disable-vaapi-accelerated-video-encode";
980 #endif
982 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
983 // Allows sending text-to-speech requests to speech-dispatcher, a common
984 // Linux speech service. Because it's buggy, the user must explicitly
985 // enable it so that visiting a random webpage can't cause instability.
986 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
987 #endif
989 #if defined(OS_MACOSX) && !defined(OS_IOS)
990 // Disables support for Core Animation plugins. This is triggered when
991 // accelerated compositing is disabled. See http://crbug.com/122430.
992 const char kDisableCoreAnimationPlugins[] =
993 "disable-core-animation-plugins";
994 #endif
996 #if defined(OS_WIN)
997 // Device scale factor passed to certain processes like renderers, etc.
998 const char kDeviceScaleFactor[] = "device-scale-factor";
1000 // Disable the Legacy Window which corresponds to the size of the WebContents.
1001 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
1003 // Disables the Win32K process mitigation policy for renderer processes.
1004 const char kDisableWin32kRendererLockDown[] =
1005 "disable-win32k-renderer-lockdown";
1007 // Enables experimental hardware acceleration for VP8/VP9 video decoding.
1008 const char kEnableAcceleratedVpxDecode[] = "enable-accelerated-vpx-decode";
1010 // DirectWrite FontCache is shared by browser to renderers using shared memory.
1011 // This switch allows us to pass the shared memory handle to the renderer.
1012 const char kFontCacheSharedHandle[] = "font-cache-shared-handle";
1014 // Sets the free memory thresholds below which the system is considered to be
1015 // under moderate and critical memory pressure. Used in the browser process,
1016 // and ignored if invalid. Specified as a pair of comma separated integers.
1017 // See base/win/memory_pressure_monitor.cc for defaults.
1018 const char kMemoryPressureThresholdsMb[] = "memory-pressure-thresholds-mb";
1020 // Enables the exporting of the tracing events to ETW. This is only supported on
1021 // Windows Vista and later.
1022 const char kTraceExportEventsToETW[] = "trace-export-events-to-etw";
1023 #endif
1025 // Don't dump stuff here, follow the same order as the header.
1027 } // namespace switches