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