Remove Win32k fieldtrial, flag and switches, and make default enabled.
[chromium-blink-merge.git] / content / public / common / content_switches.cc
blobf86d9823424e59bcdb51d1c07927800d0aac3297
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 // Block cross-site documents (i.e., HTML/XML/JSON) from being loaded in
43 // subresources when a document is not supposed to read them. This will later
44 // allow us to block them from the entire renderer process when site isolation
45 // is enabled.
46 const char kBlockCrossSiteDocuments[] = "block-cross-site-documents";
48 // Causes the browser process to crash on startup.
49 const char kBrowserCrashTest[] = "crash-test";
51 // Path to the exe to run for the renderer and plugin subprocesses.
52 const char kBrowserSubprocessPath[] = "browser-subprocess-path";
54 // Dumps extra logging about plugin loading to the log file.
55 const char kDebugPluginLoading[] = "debug-plugin-loading";
57 // Sets the tile size used by composited layers.
58 const char kDefaultTileWidth[] = "default-tile-width";
59 const char kDefaultTileHeight[] = "default-tile-height";
61 // Disable antialiasing on 2d canvas.
62 const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa";
64 // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
65 // This is controlled by policy and is kept separate from the other
66 // enable/disable switches to avoid accidentally regressing the policy
67 // support for controlling access to these APIs.
68 const char kDisable3DAPIs[] = "disable-3d-apis";
70 // Disable gpu-accelerated 2d canvas.
71 const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
73 // Disables hardware acceleration of video decode, where available.
74 const char kDisableAcceleratedVideoDecode[] =
75 "disable-accelerated-video-decode";
77 // Disable limits on the number of backing stores. Can prevent blinking for
78 // users with many windows/tabs and lots of memory.
79 const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
81 // Disable one or more Blink runtime-enabled features.
82 // Use names from RuntimeEnabledFeatures.in, separated by commas.
83 // Applied after kEnableBlinkFeatures, and after other flags that change these
84 // features.
85 const char kDisableBlinkFeatures[] = "disable-blink-features";
87 // Disable the creation of compositing layers when it would prevent LCD text.
88 const char kDisablePreferCompositingToLCDText[] =
89 "disable-prefer-compositing-to-lcd-text";
91 // Disables HTML5 DB support.
92 const char kDisableDatabases[] = "disable-databases";
94 // Disables Delay Agnostic AEC in WebRTC.
95 const char kDisableDelayAgnosticAec[] = "disable-delay-agnostic-aec";
97 // Disables delegated renderer.
98 const char kDisableDelegatedRenderer[] = "disable-delegated-renderer";
100 // Handles URL requests by NPAPI plugins through the renderer.
101 const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests";
103 // Disable the per-domain blocking for 3D APIs after GPU reset.
104 // This switch is intended only for tests.
105 extern const char kDisableDomainBlockingFor3DAPIs[] =
106 "disable-domain-blocking-for-3d-apis";
108 // Disable experimental WebGL support.
109 const char kDisableExperimentalWebGL[] = "disable-webgl";
111 // Disable FileSystem API.
112 const char kDisableFileSystem[] = "disable-file-system";
114 // Disable 3D inside of flapper.
115 const char kDisableFlash3d[] = "disable-flash-3d";
117 // Disable Stage3D inside of flapper.
118 const char kDisableFlashStage3d[] = "disable-flash-stage3d";
120 // Disables GPU hardware acceleration. If software renderer is not in place,
121 // then the GPU process won't launch.
122 const char kDisableGpu[] = "disable-gpu";
124 // Prevent the compositor from using its GPU implementation.
125 const char kDisableGpuCompositing[] = "disable-gpu-compositing";
127 // Disable proactive early init of GPU process.
128 const char kDisableGpuEarlyInit[] = "disable-gpu-early-init";
130 // Disable the limit on the number of times the GPU process may be restarted
131 // This switch is intended only for tests.
132 extern const char kDisableGpuProcessCrashLimit[] =
133 "disable-gpu-process-crash-limit";
135 // Disable GPU rasterization, i.e. rasterize on the CPU only.
136 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
137 const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
139 // When using CPU rasterizing disable low resolution tiling. This uses
140 // less power, particularly during animations, but more white may be seen
141 // during fast scrolling especially on slower devices.
142 const char kDisableLowResTiling[] = "disable-low-res-tiling";
144 // Disable the GPU process sandbox.
145 const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
147 // Disable the thread that crashes the GPU process if it stops responding to
148 // messages.
149 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
151 // Suppresses hang monitor dialogs in renderer processes. This may allow slow
152 // unload handlers on a page to prevent the tab from closing, but the Task
153 // Manager can be used to terminate the offending process in this case.
154 const char kDisableHangMonitor[] = "disable-hang-monitor";
156 // Disable hiding the close buttons of inactive tabs when the tabstrip is in
157 // stacked mode.
158 const char kDisableHideInactiveStackedTabCloseButtons[] =
159 "disable-hide-inactive-stacked-tab-close-buttons";
161 // Disable the RenderThread's HistogramCustomizer.
162 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer";
164 // Paint content on the main thread instead of the compositor thread.
165 const char kDisableImplSidePainting[] = "disable-impl-side-painting";
167 // Prevent Java from running.
168 const char kDisableJava[] = "disable-java";
170 // Don't kill a child process when it sends a bad IPC message. Apart
171 // from testing, it is a bad idea from a security perspective to enable
172 // this switch.
173 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc";
175 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
176 const char kDisablePrefixedEncryptedMedia[] =
177 "disable-prefixed-encrypted-media";
179 // Disables LCD text.
180 const char kDisableLCDText[] = "disable-lcd-text";
182 // Disables distance field text.
183 const char kDisableDistanceFieldText[] = "disable-distance-field-text";
185 // Disable LocalStorage.
186 const char kDisableLocalStorage[] = "disable-local-storage";
188 // Force logging to be disabled. Logging is enabled by default in debug
189 // builds.
190 const char kDisableLogging[] = "disable-logging";
192 // Disables Media Source API (i.e., the MediaSource object).
193 const char kDisableMediaSource[] = "disable-media-source";
195 // Disables usage of the namespace sandbox.
196 const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox";
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 compositor-accelerated touch-screen pinch gestures.
209 const char kDisablePinch[] = "disable-pinch";
211 // Disable discovering third-party plugins. Effectively loading only
212 // ones shipped with the browser plus third-party ones as specified by
213 // --extra-plugin-dir and --load-plugin switches.
214 const char kDisablePluginsDiscovery[] = "disable-plugins-discovery";
216 // Taints all <canvas> elements, regardless of origin.
217 const char kDisableReadingFromCanvas[] = "disable-reading-from-canvas";
219 // Disables remote web font support. SVG font should always work whether this
220 // option is specified or not.
221 const char kDisableRemoteFonts[] = "disable-remote-fonts";
223 // Turns off the accessibility in the renderer.
224 const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
226 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
227 const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox";
229 // Disable the setuid sandbox (Linux only).
230 const char kDisableSetuidSandbox[] = "disable-setuid-sandbox";
232 // Disable shared workers.
233 const char kDisableSharedWorkers[] = "disable-shared-workers";
235 // For tests, disable single thread scheduler and only manually composite.
236 const char kDisableSingleThreadProxyScheduler[] =
237 "disable-single-thread-proxy-scheduler";
239 // Disable smooth scrolling for testing.
240 const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
242 // Disables the use of a 3D software rasterizer.
243 const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
245 // Disables the Web Speech API.
246 const char kDisableSpeechAPI[] = "disable-speech-api";
248 // Disables SVG 1.1 DOM.
249 const char kDisableSVG1DOM[] = "disable-svg1dom";
251 // Disable text blob rendering.
252 const char kDisableTextBlobs[] = "disable-text-blobs";
254 // Disable multithreaded GPU compositing of web content.
255 const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
257 // Disable multithreaded, compositor scrolling of web content.
258 const char kDisableThreadedScrolling[] = "disable-threaded-scrolling";
260 // Disable V8 idle tasks.
261 const char kDisableV8IdleTasks[] = "disable-v8-idle-tasks";
263 // Don't enforce the same-origin policy. (Used by people testing their sites.)
264 const char kDisableWebSecurity[] = "disable-web-security";
266 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
267 const char kDisableXSSAuditor[] = "disable-xss-auditor";
269 // Specifies if the |DOMAutomationController| needs to be bound in the
270 // renderer. This binding happens on per-frame basis and hence can potentially
271 // be a performance bottleneck. One should only enable it when automating dom
272 // based tests.
273 const char kDomAutomationController[] = "dom-automation";
275 // Enable antialiasing on 2d canvas clips (as opposed to draw operations)
276 const char kEnable2dCanvasClipAntialiasing[] = "enable-2d-canvas-clip-aa";
278 // Disable partially decoding jpeg images using the GPU.
279 // At least YUV decoding will be accelerated when not using this flag.
280 // Has no effect unless GPU rasterization is enabled.
281 const char kDisableAcceleratedJpegDecoding[] =
282 "disable-accelerated-jpeg-decoding";
284 // Enable bleeding-edge code to make Chrome draw content faster. The changes
285 // behind this path are very likely to break lots of content.
286 // ** DO NOT use this flag unless you know what you are doing. **
287 const char kEnableBleedingEdgeRenderingFastPaths[] =
288 "enable-bleeding-edge-rendering-fast-paths";
290 // Enables new cc/animation system (Project Heaviside). crbug.com/394772
291 const char kEnableCompositorAnimationTimelines[] =
292 "enable-compositor-animation-timelines";
294 // Enables LCD text.
295 const char kEnableLCDText[] = "enable-lcd-text";
297 // Enables using signed distance fields when rendering text.
298 // Only valid if GPU rasterization is enabled as well.
299 const char kEnableDistanceFieldText[] = "enable-distance-field-text";
301 // Enable the experimental Credential Manager JavaScript API.
302 const char kEnableCredentialManagerAPI[] = "enable-credential-manager-api";
304 // Use a BeginFrame signal from browser to renderer to schedule rendering.
305 const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling";
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 // Defer image decoding in WebKit until painting.
321 const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
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 // 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 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video";
382 // Enables compositor-accelerated touch-screen pinch gestures.
383 const char kEnablePinch[] = "enable-pinch";
385 // Enables testing features of the Plugin Placeholder. For internal use only.
386 const char kEnablePluginPlaceholderTesting[] =
387 "enable-plugin-placeholder-testing";
389 // Make the values returned to window.performance.memory more granular and more
390 // up to date in shared worker. Without this flag, the memory information is
391 // still available, but it is bucketized and updated less frequently. This flag
392 // also applys to workers.
393 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
395 // Enables payloads for received push messages when using the W3C Push API.
396 const char kEnablePushMessagePayload[] = "enable-push-message-payload";
398 // Enable hasPermission() method of the W3C Push API.
399 const char kEnablePushMessagingHasPermission[] =
400 "enable-push-messaging-has-permission";
402 // Set options to cache V8 data. (off, preparse data, or code)
403 const char kV8CacheOptions[] = "v8-cache-options";
405 // Signals that the V8 natives file has been transfered to the child process
406 // by a file descriptor.
407 const char kV8NativesPassedByFD[] = "v8-natives-passed-by-fd";
409 // Signals that the V8 startup snapshot file has been transfered to the child
410 // process by a file descriptor.
411 const char kV8SnapshotPassedByFD[] = "v8-snapshot-passed-by-fd";
413 // Enables the CSS multicol implementation that uses the regions implementation.
414 const char kEnableRegionBasedColumns[] =
415 "enable-region-based-columns";
417 // Cause the OS X sandbox write to syslog every time an access to a resource
418 // is denied by the sandbox.
419 const char kEnableSandboxLogging[] = "enable-sandbox-logging";
421 // Enables seccomp-bpf support for Android. Requires experimental kernel
422 // support. <http://crbug.com/166704>
423 const char kEnableSeccompFilterSandbox[] =
424 "enable-seccomp-filter-sandbox";
426 // Enables the Skia benchmarking extension
427 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
429 // Enables slimming paint: http://www.chromium.org/blink/slimming-paint
430 const char kEnableSlimmingPaint[] = "enable-slimming-paint";
432 // On platforms that support it, enables smooth scroll animation.
433 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
435 // Enable spatial navigation
436 const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
438 // Enables implementation of the Cache-Control: stale-while-revalidate directive
439 // which permits servers to allow the use of stale resources while revalidation
440 // proceeds in the background.
441 const char kEnableStaleWhileRevalidate[] = "enable-stale-while-revalidate";
443 // Enables StatsTable, logging statistics to a global named shared memory table.
444 const char kEnableStatsTable[] = "enable-stats-table";
446 // Experimentally ensures that each renderer process:
447 // 1) Only handles rendering for pages from a single site, apart from iframes.
448 // (Note that a page can reference content from multiple origins due to images,
449 // JavaScript files, etc. Cross-site iframes are also loaded in-process.)
450 // 2) Only has authority to see or use cookies for the page's top-level origin.
451 // (So if a.com iframes b.com, the b.com network request will be sent without
452 // cookies.)
453 // This is expected to break compatibility with many pages for now. Unlike the
454 // --site-per-process flag, this allows cross-site iframes, but it blocks all
455 // cookies on cross-site requests.
456 const char kEnableStrictSiteIsolation[] = "enable-strict-site-isolation";
458 // Blocks all insecure requests from secure contexts, and prevents the user
459 // from overriding that decision.
460 const char kEnableStrictMixedContentChecking[] =
461 "enable-strict-mixed-content-checking";
463 // Blocks insecure usage of number of powerful features (geolocation, for
464 // example) that we haven't yet deprecated for the web at large.
465 const char kEnableStrictPowerfulFeatureRestrictions[] =
466 "enable-strict-powerful-feature-restrictions";
468 // Enable support for sync events in ServiceWorkers.
469 const char kEnableServiceWorkerSync[] = "enable-service-worker-sync";
471 // Enable use of experimental TCP sockets API for sending data in the
472 // SYN packet.
473 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
475 // Enabled threaded compositing for layout tests.
476 const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
478 // Enable tracing during the execution of browser tests.
479 const char kEnableTracing[] = "enable-tracing";
481 // The filename to write the output of the test tracing to.
482 const char kEnableTracingOutput[] = "enable-tracing-output";
484 // Enable screen capturing support for MediaStream API.
485 const char kEnableUserMediaScreenCapturing[] =
486 "enable-usermedia-screen-capturing";
488 // Enables the use of the @viewport CSS rule, which allows
489 // pages to control aspects of their own layout. This also turns on touch-screen
490 // pinch gestures.
491 const char kEnableViewport[] = "enable-viewport";
493 // Enables the viewport meta tag, the de facto way to control layout which works
494 // only on mobile browsers.
495 const char kEnableViewportMeta[] = "enable-viewport-meta";
497 // Resizes of the main frame are the caused by changing between landscape
498 // and portrait mode (i.e. Android) so the page should be rescaled to fit
499 const char kMainFrameResizesAreOrientationChanges[] =
500 "main-frame-resizes-are-orientation-changes";
502 // Enable the Vtune profiler support.
503 const char kEnableVtune[] = "enable-vtune-support";
505 // Enables WebGL extensions not yet approved by the community.
506 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
508 // Enables WebGL rendering into a scanout buffer for overlay support.
509 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
511 // Enable rasterizer that writes directly to GPU memory associated with tiles.
512 const char kEnableZeroCopy[] = "enable-zero-copy";
514 // Explicitly allows additional ports using a comma-separated list of port
515 // numbers.
516 const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
518 // Load NPAPI plugins from the specified directory.
519 const char kExtraPluginDir[] = "extra-plugin-dir";
521 // This option can be used to force field trials when testing changes locally.
522 // The argument is a list of name and value pairs, separated by slashes. If a
523 // trial name is prefixed with an asterisk, that trial will start activated.
524 // For example, the following argument defines two trials, with the second one
525 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/"
526 // This option is also used by the browser to send the list of trials to
527 // renderers, using the same format. See
528 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
529 const char kForceFieldTrials[] = "force-fieldtrials";
531 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
532 // accelerated compositing + impl-side painting. Overrides the
533 // kEnableGpuRasterization flag.
534 const char kForceGpuRasterization[] = "force-gpu-rasterization";
536 // The number of multisample antialiasing samples for GPU rasterization.
537 // Requires MSAA support on GPU to have an effect. 0 disables MSAA.
538 const char kGpuRasterizationMSAASampleCount[] =
539 "gpu-rasterization-msaa-sample-count";
541 // Force renderer accessibility to be on instead of enabling it on demand when
542 // a screen reader is detected. The disable-renderer-accessibility switch
543 // overrides this if present.
544 const char kForceRendererAccessibility[] = "force-renderer-accessibility";
546 // Always use text blob rendering, overriding kDisableTextBlobs and any
547 // heuristics that may otherwise disable it.
548 // TODO(fmalita): remove after --disable-impl-side-painting is phased out.
549 const char kForceTextBlobs[] = "force-text-blobs";
551 // Passes gpu device_id from browser process to GPU process.
552 const char kGpuDeviceID[] = "gpu-device-id";
554 // Passes gpu driver_vendor from browser process to GPU process.
555 const char kGpuDriverVendor[] = "gpu-driver-vendor";
557 // Passes gpu driver_version from browser process to GPU process.
558 const char kGpuDriverVersion[] = "gpu-driver-version";
560 // Extra command line options for launching the GPU process (normally used
561 // for debugging). Use like renderer-cmd-prefix.
562 const char kGpuLauncher[] = "gpu-launcher";
564 // Makes this process a GPU sub-process.
565 const char kGpuProcess[] = "gpu-process";
567 // Allows shmat() system call in the GPU sandbox.
568 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
570 // Makes GPU sandbox failures fatal.
571 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
573 // Starts the GPU sandbox before creating a GL context.
574 const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
576 // Causes the GPU process to display a dialog on launch.
577 const char kGpuStartupDialog[] = "gpu-startup-dialog";
579 // Passes gpu vendor_id from browser process to GPU process.
580 const char kGpuVendorID[] = "gpu-vendor-id";
582 // These mappings only apply to the host resolver.
583 const char kHostResolverRules[] = "host-resolver-rules";
585 // Ignores certificate-related errors.
586 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
588 // Ignores GPU blacklist.
589 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
591 // Run the GPU process as a thread in the browser process.
592 const char kInProcessGPU[] = "in-process-gpu";
594 // Overrides the timeout, in seconds, that a child process waits for a
595 // connection from the browser before killing itself.
596 const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
598 // Specifies the flags passed to JS engine
599 const char kJavaScriptFlags[] = "js-flags";
601 // Load an NPAPI plugin from the specified path.
602 const char kLoadPlugin[] = "load-plugin";
604 // Logs GPU control list decisions when enforcing blacklist rules.
605 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
607 // Sets the minimum log level. Valid values are from 0 to 3:
608 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
609 const char kLoggingLevel[] = "log-level";
611 // Enables saving net log events to a file and sets the file name to use.
612 const char kLogNetLog[] = "log-net-log";
614 // Make plugin processes log their sent and received messages to VLOG(1).
615 const char kLogPluginMessages[] = "log-plugin-messages";
617 // Sets the width and height above which a composited layer will get tiled.
618 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
619 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
621 // Sample memory usage with high frequency and store the results to the
622 // Renderer.Memory histogram. Used in memory tests.
623 const char kMemoryMetrics[] = "memory-metrics";
625 // Mutes audio sent to the audio device so it is not audible during
626 // automated testing.
627 const char kMuteAudio[] = "mute-audio";
629 // Don't send HTTP-Referer headers.
630 const char kNoReferrers[] = "no-referrers";
632 // Disables the sandbox for all process types that are normally sandboxed.
633 const char kNoSandbox[] = "no-sandbox";
635 // Disables appcontainer/lowbox for renderer on Win8+ platforms.
636 const char kDisableAppContainer[] = "disable-appcontainer";
638 // Number of worker threads used to rasterize content.
639 const char kNumRasterThreads[] = "num-raster-threads";
641 // Controls the behavior of history navigation in response to horizontal
642 // overscroll.
643 // Set the value to '0' to disable.
644 // Set the value to '1' to enable the behavior where pages slide in and out in
645 // response to the horizontal overscroll gesture and a screenshot of the target
646 // page is shown.
647 // Set the value to '2' to enable the simplified overscroll UI where a
648 // navigation arrow slides in from the side of the screen in response to the
649 // horizontal overscroll gesture.
650 // Defaults to '1'.
651 const char kOverscrollHistoryNavigation[] =
652 "overscroll-history-navigation";
654 // Specifies a command that should be used to launch the plugin process. Useful
655 // for running the plugin process through purify or quantify. Ex:
656 // --plugin-launcher="path\to\purify /Run=yes"
657 const char kPluginLauncher[] = "plugin-launcher";
659 // Tells the plugin process the path of the plugin to load
660 const char kPluginPath[] = "plugin-path";
662 // Causes the process to run as a plugin subprocess.
663 const char kPluginProcess[] = "plugin";
665 // Causes the plugin process to display a dialog on launch.
666 const char kPluginStartupDialog[] = "plugin-startup-dialog";
668 // Argument to the process type that indicates a PPAPI broker process type.
669 const char kPpapiBrokerProcess[] = "ppapi-broker";
671 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
672 const char kPpapiFlashArgs[] = "ppapi-flash-args";
674 // Runs PPAPI (Pepper) plugins in-process.
675 const char kPpapiInProcess[] = "ppapi-in-process";
677 // Like kPluginLauncher for PPAPI plugins.
678 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
680 // Argument to the process type that indicates a PPAPI plugin process type.
681 const char kPpapiPluginProcess[] = "ppapi";
683 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
684 // --no-sandbox as well or the sandbox won't allow the dialog to display.
685 const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
687 // Runs a single process for each site (i.e., group of pages from the same
688 // registered domain) the user visits. We default to using a renderer process
689 // for each site instance (i.e., group of pages from the same registered
690 // domain with script connections to each other).
691 const char kProcessPerSite[] = "process-per-site";
693 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
694 // renderer process. We default to using a renderer process for each
695 // site instance (i.e., group of pages from the same registered domain with
696 // script connections to each other).
697 const char kProcessPerTab[] = "process-per-tab";
699 // The value of this switch determines whether the process is started as a
700 // renderer or plugin host. If it's empty, it's the browser.
701 const char kProcessType[] = "type";
703 // Enables more web features over insecure connections. Designed to be used
704 // for testing purposes only.
705 const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
707 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
708 const char kRegisterPepperPlugins[] = "register-pepper-plugins";
710 // Enables remote debug over HTTP on the specified port.
711 const char kRemoteDebuggingPort[] = "remote-debugging-port";
713 // The contents of this flag are prepended to the renderer command line.
714 // Useful values might be "valgrind" or "xterm -e gdb --args".
715 const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
717 // Causes the process to run as renderer instead of as browser.
718 const char kRendererProcess[] = "renderer";
720 // Overrides the default/calculated limit to the number of renderer processes.
721 // Very high values for this setting can lead to high memory/resource usage
722 // or instability.
723 const char kRendererProcessLimit[] = "renderer-process-limit";
725 // Causes the renderer process to display a dialog on launch.
726 const char kRendererStartupDialog[] = "renderer-startup-dialog";
728 // Reduce the default `referer` header's granularity.
729 const char kReducedReferrerGranularity[] =
730 "reduced-referrer-granularity";
732 // Handles frame scrolls via the root RenderLayer instead of the FrameView.
733 const char kRootLayerScrolls[] = "root-layer-scrolls";
735 // Causes the process to run as a sandbox IPC subprocess.
736 const char kSandboxIPCProcess[] = "sandbox-ipc";
738 // Enables or disables scroll end effect in response to vertical overscroll.
739 // Set the value to '1' to enable the feature, and set to '0' to disable.
740 // Defaults to disabled.
741 const char kScrollEndEffect[] = "scroll-end-effect";
743 // Visibly render a border around paint rects in the web page to help debug
744 // and study painting behavior.
745 const char kShowPaintRects[] = "show-paint-rects";
747 // Runs the renderer and plugins in the same process as the browser
748 const char kSingleProcess[] = "single-process";
750 // Experimentally enforces a one-site-per-process security policy.
751 // All cross-site navigations force process swaps, and we can restrict a
752 // renderer process's access rights based on its site. For details, see:
753 // http://www.chromium.org/developers/design-documents/site-isolation
755 // Unlike --enable-strict-site-isolation (which allows cross-site iframes),
756 // this flag does not affect which cookies are attached to cross-site requests.
757 // Support is being added to render cross-site iframes in a different process
758 // than their parent pages.
759 const char kSitePerProcess[] = "site-per-process";
761 // Skip gpu info collection, blacklist loading, and blacklist auto-update
762 // scheduling at browser startup time.
763 // Therefore, all GPU features are available, and about:gpu page shows empty
764 // content. The switch is intended only for layout tests.
765 // TODO(gab): Get rid of this switch entirely.
766 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
768 // Specifies if the browser should start in fullscreen mode, like if the user
769 // had pressed F11 right after startup.
770 const char kStartFullscreen[] = "start-fullscreen";
772 // Specifies if the |StatsCollectionController| needs to be bound in the
773 // renderer. This binding happens on per-frame basis and hence can potentially
774 // be a performance bottleneck. One should only enable it when running a test
775 // that needs to access the provided statistics.
776 const char kStatsCollectionController[] =
777 "enable-stats-collection-bindings";
779 // Upscale defaults to "good".
780 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
782 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
783 // One flag for upscaling, one for downscaling.
784 // Upscale defaults to "best".
785 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
787 // Allows for forcing socket connections to http/https to use fixed ports.
788 const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
789 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
791 // Type of the current test harness ("browser" or "ui").
792 const char kTestType[] = "test-type";
794 // Controls how text selection granularity changes when touch text selection
795 // handles are dragged. Should be "character" or "direction". If not specified,
796 // the platform default is used.
797 const char kTouchTextSelectionStrategy[] = "touch-selection-strategy";
799 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
800 // can specify the specific trace categories to include (e.g.
801 // --trace-shutdown=base,net) otherwise, all events are recorded.
802 // --trace-shutdown-file can be used to control where the trace log gets stored
803 // to since there is otherwise no way to access the result.
804 const char kTraceShutdown[] = "trace-shutdown";
806 // If supplied, sets the file which shutdown tracing will be stored into, if
807 // omitted the default will be used "chrometrace.log" in the current directory.
808 // Has no effect unless --trace-shutdown is also supplied.
809 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
810 const char kTraceShutdownFile[] = "trace-shutdown-file";
812 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
813 // specify the specific trace categories to include (e.g.
814 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
815 // flag results in the first call to BeginTracing() to receive all trace events
816 // since startup. In Chrome, you may find --trace-startup-file and
817 // --trace-startup-duration to control the auto-saving of the trace (not
818 // supported in the base-only TraceLog component).
819 const char kTraceStartup[] = "trace-startup";
821 // Sets the time in seconds until startup tracing ends. If omitted a default of
822 // 5 seconds is used. Has no effect without --trace-startup, or if
823 // --startup-trace-file=none was supplied.
824 const char kTraceStartupDuration[] = "trace-startup-duration";
826 // If supplied, sets the file which startup tracing will be stored into, if
827 // omitted the default will be used "chrometrace.log" in the current directory.
828 // Has no effect unless --trace-startup is also supplied.
829 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
830 // As a special case, can be set to 'none' - this disables automatically saving
831 // the result to a file and the first manually recorded trace will then receive
832 // all events since startup.
833 const char kTraceStartupFile[] = "trace-startup-file";
835 // Sets the target URL for uploading tracing data.
836 const char kTraceUploadURL[] = "trace-upload-url";
839 // Prioritizes the UI's command stream in the GPU process
840 extern const char kUIPrioritizeInGpuProcess[] =
841 "ui-prioritize-in-gpu-process";
843 // Bypass the media stream infobar by selecting the default device for media
844 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
845 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
847 // Enable native GPU memory buffer support when available.
848 const char kEnableNativeGpuMemoryBuffers[] = "enable-native-gpu-memory-buffers";
850 // Overrides the default texture target used with CHROMIUM_image extension.
851 const char kUseImageTextureTarget[] = "use-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 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 // Override the maximum framerate as can be specified in calls to getUserMedia.
915 // This flag expects a value. Example: --max-gum-fps=17.5
916 const char kWebRtcMaxCaptureFramerate[] = "max-gum-fps";
917 #endif
919 #if defined(OS_ANDROID)
920 // Disable user gesture requirement for media playback.
921 const char kDisableGestureRequirementForMediaPlayback[] =
922 "disable-gesture-requirement-for-media-playback";
924 // Disable the click delay by sending click events during double tap.
925 const char kDisableClickDelay[] = "disable-click-delay";
927 // Disable overscroll edge effects like those found in Android views.
928 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
930 // Disable the pull-to-refresh effect when vertically overscrolling content.
931 const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect";
933 // Disable the locking feature of the screen orientation API.
934 const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
936 // WebRTC is enabled by default on Android.
937 const char kDisableWebRTC[] = "disable-webrtc";
939 // The telephony region (ISO country code) to use in phone number detection.
940 const char kNetworkCountryIso[] = "network-country-iso";
942 // Enables remote debug over HTTP on the specified socket name.
943 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
945 // Block ChildProcessMain thread of the renderer's ChildProcessService until a
946 // Java debugger is attached.
947 const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
948 #endif
950 // Enable the aggressive flushing of DOM Storage to minimize data loss.
951 const char kEnableAggressiveDOMStorageFlushing[] =
952 "enable-aggressive-domstorage-flushing";
954 // Disable web audio API.
955 const char kDisableWebAudio[] = "disable-webaudio";
957 #if defined(OS_CHROMEOS)
958 // Disables panel fitting (used for mirror mode).
959 const char kDisablePanelFitting[] = "disable-panel-fitting";
961 // Disables VA-API accelerated video encode.
962 const char kDisableVaapiAcceleratedVideoEncode[] =
963 "disable-vaapi-accelerated-video-encode";
964 #endif
966 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
967 // Allows sending text-to-speech requests to speech-dispatcher, a common
968 // Linux speech service. Because it's buggy, the user must explicitly
969 // enable it so that visiting a random webpage can't cause instability.
970 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
971 #endif
973 #if defined(OS_MACOSX) && !defined(OS_IOS)
974 // Disables support for Core Animation plugins. This is triggered when
975 // accelerated compositing is disabled. See http://crbug.com/122430.
976 const char kDisableCoreAnimationPlugins[] =
977 "disable-core-animation-plugins";
978 #endif
980 #if defined(OS_WIN)
981 // Device scale factor passed to certain processes like renderers, etc.
982 const char kDeviceScaleFactor[] = "device-scale-factor";
984 // Disable the Legacy Window which corresponds to the size of the WebContents.
985 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
987 // Disables the Win32K process mitigation policy for renderer processes.
988 const char kDisableWin32kRendererLockDown[] =
989 "disable-win32k-renderer-lockdown";
991 // DirectWrite FontCache is shared by browser to renderers using shared memory.
992 // This switch allows us to pass the shared memory handle to the renderer.
993 const char kFontCacheSharedHandle[] = "font-cache-shared-handle";
995 // Sets the free memory thresholds below which the system is considered to be
996 // under moderate and critical memory pressure. Used in the browser process,
997 // and ignored if invalid. Specified as a pair of comma separated integers.
998 // See base/win/memory_pressure_monitor.cc for defaults.
999 const char kMemoryPressureThresholdsMb[] = "memory-pressure-thresholds-mb";
1001 // Enables the exporting of the tracing events to ETW. This is only supported on
1002 // Windows Vista and later.
1003 const char kTraceExportEventsToETW[] = "trace-export-events-to-etw";
1004 #endif
1006 // Enables the use of NPAPI plugins.
1007 const char kEnableNpapi[] = "enable-npapi";
1009 // Don't dump stuff here, follow the same order as the header.
1011 } // namespace switches