1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/public/common/content_switches.h"
7 #include "base/command_line.h"
11 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
12 // have an effect. 0 disables MSAA.
13 const char kAcceleratedCanvas2dMSAASampleCount
[] = "canvas-msaa-sample-count";
15 // By default, file:// URIs cannot read other file:// URIs. This is an
16 // override for developers who need the old behavior for testing.
17 const char kAllowFileAccessFromFiles
[] = "allow-file-access-from-files";
19 // Allows loopback interface to be added in network list for peer connection.
20 const char kAllowLoopbackInPeerConnection
[] =
21 "allow-loopback-in-peer-connection";
23 // Enables the sandboxed processes to run without a job object assigned to them.
24 // This flag is required to allow Chrome to run in RemoteApps or Citrix. This
25 // flag can reduce the security of the sandboxed processes and allow them to do
26 // certain API calls like shut down Windows or access the clipboard. Also we
27 // lose the chance to kill some processes until the outer job that owns them
29 const char kAllowNoSandboxJob
[] = "allow-no-sandbox-job";
31 // Allows debugging of sandboxed processes (see zygote_main_linux.cc).
32 const char kAllowSandboxDebugging
[] = "allow-sandbox-debugging";
34 // The same as kAuditHandles except all handles are enumerated.
35 const char kAuditAllHandles
[] = "enable-handle-auditing-all";
37 // Enumerates and prints a child process' most dangerous handles when it
39 const char kAuditHandles
[] = "enable-handle-auditing";
41 // Blacklist the GPU for accelerated compositing.
42 const char kBlacklistAcceleratedCompositing
[] =
43 "blacklist-accelerated-compositing";
45 // Blacklist the GPU for WebGL.
46 const char kBlacklistWebGL
[] = "blacklist-webgl";
48 // Choose which logging channels in blink platform to activate. See
49 // Logging.cpp in blink's Source/platform for a list of available channels.
50 const char kBlinkPlatformLogChannels
[] = "blink-platform-log-channels";
52 // Block cross-site documents (i.e., HTML/XML/JSON) from being loaded in
53 // subresources when a document is not supposed to read them. This will later
54 // allow us to block them from the entire renderer process when site isolation
56 const char kBlockCrossSiteDocuments
[] = "block-cross-site-documents";
58 // Causes the browser process to throw an assertion on startup.
59 const char kBrowserAssertTest
[] = "assert-test";
61 // Causes the browser process to crash on startup.
62 const char kBrowserCrashTest
[] = "crash-test";
64 // Path to the exe to run for the renderer and plugin subprocesses.
65 const char kBrowserSubprocessPath
[] = "browser-subprocess-path";
67 // Dumps extra logging about plugin loading to the log file.
68 const char kDebugPluginLoading
[] = "debug-plugin-loading";
70 // Sets the tile size used by composited layers.
71 const char kDefaultTileWidth
[] = "default-tile-width";
72 const char kDefaultTileHeight
[] = "default-tile-height";
74 // Disable antialiasing on 2d canvas.
75 const char kDisable2dCanvasAntialiasing
[] = "disable-canvas-aa";
77 // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
78 // This is controlled by policy and is kept separate from the other
79 // enable/disable switches to avoid accidentally regressing the policy
80 // support for controlling access to these APIs.
81 const char kDisable3DAPIs
[] = "disable-3d-apis";
83 // Disable gpu-accelerated 2d canvas.
84 const char kDisableAccelerated2dCanvas
[] = "disable-accelerated-2d-canvas";
86 // Disables accelerated compositing.
87 const char kDisableAcceleratedCompositing
[] = "disable-accelerated-compositing";
89 // Disables accelerated compositing for backgrounds of root layers with
90 // background-attachment: fixed.
91 const char kDisableAcceleratedFixedRootBackground
[] =
92 "disable-accelerated-fixed-root-background";
94 // Disables the hardware acceleration of 3D CSS and animation.
95 const char kDisableAcceleratedLayers
[] = "disable-accelerated-layers";
97 // Disables accelerated compositing for overflow scroll.
98 const char kDisableAcceleratedOverflowScroll
[] =
99 "disable-accelerated-overflow-scroll";
101 // Disables layer squashing.
102 const char kDisableLayerSquashing
[] =
103 "disable-layer-squashing";
105 // Disables GPU accelerated video display.
106 const char kDisableAcceleratedVideo
[] = "disable-accelerated-video";
108 // Disables hardware acceleration of video decode, where available.
109 const char kDisableAcceleratedVideoDecode
[] =
110 "disable-accelerated-video-decode";
112 // Disables the alternate window station for the renderer.
113 const char kDisableAltWinstation
[] = "disable-winsta";
115 // Disable the ApplicationCache.
116 const char kDisableApplicationCache
[] = "disable-application-cache";
118 // Disable limits on the number of backing stores. Can prevent blinking for
119 // users with many windows/tabs and lots of memory.
120 const char kDisableBackingStoreLimit
[] = "disable-backing-store-limit";
122 // Disable browser plugin compositing experiment.
123 const char kDisableBrowserPluginCompositing
[] =
124 "disable-browser-plugin-compositing";
126 // See comment for kEnableCompositingForFixedPosition.
127 const char kDisableCompositingForFixedPosition
[] =
128 "disable-fixed-position-compositing";
130 // See comment for kEnableCompositingForTransition.
131 const char kDisableCompositingForTransition
[] =
132 "disable-transition-compositing";
134 // Disables HTML5 DB support.
135 const char kDisableDatabases
[] = "disable-databases";
137 // Disables delegated renderer.
138 const char kDisableDelegatedRenderer
[] = "disable-delegated-renderer";
140 // Disables desktop notifications (default enabled on windows).
141 const char kDisableDesktopNotifications
[] = "disable-desktop-notifications";
143 // Disables experimental navigator content utils implementation.
144 const char kDisableNavigatorContentUtils
[] =
145 "disable-navigator-content-utils";
147 // Handles URL requests by NPAPI plugins through the renderer.
148 const char kDisableDirectNPAPIRequests
[] = "disable-direct-npapi-requests";
150 // Disable the per-domain blocking for 3D APIs after GPU reset.
151 // This switch is intended only for tests.
152 extern const char kDisableDomainBlockingFor3DAPIs
[] =
153 "disable-domain-blocking-for-3d-apis";
155 // Disable experimental WebGL support.
156 const char kDisableExperimentalWebGL
[] = "disable-webgl";
158 // Disable FileSystem API.
159 const char kDisableFileSystem
[] = "disable-file-system";
161 // Disables sending filters (SkImageFilter objects) between processes over IPC
162 const char kDisableFiltersOverIPC
[] = "disable-filters-over-ipc";
164 const char kDisableFixedPositionCreatesStackingContext
[]
165 = "disable-fixed-position-creates-stacking-context";
167 // Disable 3D inside of flapper.
168 const char kDisableFlash3d
[] = "disable-flash-3d";
170 // Disable Stage3D inside of flapper.
171 const char kDisableFlashStage3d
[] = "disable-flash-stage3d";
173 // This flag disables force compositing mode and prevents it from being enabled
175 const char kDisableForceCompositingMode
[] = "disable-force-compositing-mode";
177 // Disable deferral of scroll-ending gesture events when a scroll is active.
178 const char kDisableGestureDebounce
[] = "disable-gesture-debounce";
180 const char kDisableGestureTapHighlight
[] = "disable-gesture-tap-highlight";
182 // Disable GL multisampling.
183 const char kDisableGLMultisampling
[] = "disable-gl-multisampling";
185 // Disables GPU hardware acceleration. If software renderer is not in place,
186 // then the GPU process won't launch.
187 const char kDisableGpu
[] = "disable-gpu";
189 // Prevent the compositor from using its GPU implementation.
190 const char kDisableGpuCompositing
[] = "disable-gpu-compositing";
192 // Disable the limit on the number of times the GPU process may be restarted
193 // This switch is intended only for tests.
194 extern const char kDisableGpuProcessCrashLimit
[] =
195 "disable-gpu-process-crash-limit";
197 // Do not launch the GPU process shortly after browser process launch. Instead
198 // launch it when it is first needed.
199 const char kDisableGpuProcessPrelaunch
[] = "disable-gpu-process-prelaunch";
201 // Disable GPU rasterization, i.e. rasterize on the CPU only.
202 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
203 const char kDisableGpuRasterization
[] = "disable-gpu-rasterization";
205 // Disable the GPU process sandbox.
206 const char kDisableGpuSandbox
[] = "disable-gpu-sandbox";
208 // Disable the thread that crashes the GPU process if it stops responding to
210 const char kDisableGpuWatchdog
[] = "disable-gpu-watchdog";
212 // Suppresses hang monitor dialogs in renderer processes. This may allow slow
213 // unload handlers on a page to prevent the tab from closing, but the Task
214 // Manager can be used to terminate the offending process in this case.
215 const char kDisableHangMonitor
[] = "disable-hang-monitor";
217 // Disable the RenderThread's HistogramCustomizer.
218 const char kDisableHistogramCustomizer
[] = "disable-histogram-customizer";
220 // Paint content on the main thread instead of the compositor thread.
221 // Overrides the kEnableImplSidePainting flag.
222 const char kDisableImplSidePainting
[] = "disable-impl-side-painting";
224 // Prevent Java from running.
225 const char kDisableJava
[] = "disable-java";
227 // Don't execute JavaScript (browser JS like the new tab page still runs).
228 const char kDisableJavaScript
[] = "disable-javascript";
230 // Don't kill a child process when it sends a bad IPC message. Apart
231 // from testing, it is a bad idea from a security perspective to enable
233 const char kDisableKillAfterBadIPC
[] = "disable-kill-after-bad-ipc";
235 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
236 const char kDisablePrefixedEncryptedMedia
[] =
237 "disable-prefixed-encrypted-media";
239 // Disables LCD text.
240 const char kDisableLCDText
[] = "disable-lcd-text";
242 // Disable LocalStorage.
243 const char kDisableLocalStorage
[] = "disable-local-storage";
245 // Force logging to be disabled. Logging is enabled by default in debug
247 const char kDisableLogging
[] = "disable-logging";
249 // Disable rasterizer that writes directly to GPU memory.
250 // Overrides the kEnableMapImage flag.
251 const char kDisableMapImage
[] = "disable-map-image";
254 const char kDisablePepper3d
[] = "disable-pepper-3d";
256 // Disables compositor-accelerated touch-screen pinch gestures.
257 const char kDisablePinch
[] = "disable-pinch";
259 // Prevent plugins from running.
260 const char kDisablePlugins
[] = "disable-plugins";
262 // Disable discovering third-party plug-ins. Effectively loading only
263 // ones shipped with the browser plus third-party ones as specified by
264 // --extra-plugin-dir and --load-plugin switches.
265 const char kDisablePluginsDiscovery
[] = "disable-plugins-discovery";
267 // Disables remote web font support. SVG font should always work whether this
268 // option is specified or not.
269 const char kDisableRemoteFonts
[] = "disable-remote-fonts";
271 // Turns off the accessibility in the renderer.
272 const char kDisableRendererAccessibility
[] = "disable-renderer-accessibility";
274 // Disables the new layout/paint system which paints after layout is complete.
275 const char kDisableRepaintAfterLayout
[] = "disable-repaint-after-layout";
277 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
278 const char kDisableSeccompFilterSandbox
[] = "disable-seccomp-filter-sandbox";
280 // Disable session storage.
281 const char kDisableSessionStorage
[] = "disable-session-storage";
283 // Disable the setuid sandbox (Linux only).
284 const char kDisableSetuidSandbox
[] = "disable-setuid-sandbox";
286 // Enable shared workers. Functionality not yet complete.
287 const char kDisableSharedWorkers
[] = "disable-shared-workers";
289 // Disables site-specific tailoring to compatibility issues in WebKit.
290 const char kDisableSiteSpecificQuirks
[] = "disable-site-specific-quirks";
292 // Disable smooth scrolling for testing.
293 const char kDisableSmoothScrolling
[] = "disable-smooth-scrolling";
295 // Disables the use of a 3D software rasterizer.
296 const char kDisableSoftwareRasterizer
[] = "disable-software-rasterizer";
298 // Disables speech input.
299 const char kDisableSpeechInput
[] = "disable-speech-input";
301 // Disable False Start in SSL and TLS connections.
302 const char kDisableSSLFalseStart
[] = "disable-ssl-false-start";
304 // Disable multithreaded GPU compositing of web content.
305 const char kDisableThreadedCompositing
[] = "disable-threaded-compositing";
307 // Disables the threaded HTML parser in Blink
308 const char kDisableThreadedHTMLParser
[] = "disable-threaded-html-parser";
310 // Disable accelerated overflow scrolling in corner cases (that would not be
311 // handled by enable-accelerated-overflow-scroll).
312 const char kDisableUniversalAcceleratedOverflowScroll
[] =
313 "disable-universal-accelerated-overflow-scroll";
315 // Disables unprefixed Media Source API (i.e., the MediaSource object).
316 const char kDisableUnprefixedMediaSource
[] = "disable-unprefixed-media-source";
318 // Disables prefixed Media Source API (i.e., the WebKitMediaSource object).
319 const char kDisableWebKitMediaSource
[] = "disable-webkit-media-source";
321 // Don't enforce the same-origin policy. (Used by people testing their sites.)
322 const char kDisableWebSecurity
[] = "disable-web-security";
324 // Disables support for XSLT.
325 const char kDisableXSLT
[] = "disable-xslt";
327 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
328 const char kDisableXSSAuditor
[] = "disable-xss-auditor";
330 // Specifies if the |DOMAutomationController| needs to be bound in the
331 // renderer. This binding happens on per-frame basis and hence can potentially
332 // be a performance bottleneck. One should only enable it when automating dom
334 const char kDomAutomationController
[] = "dom-automation";
336 // Enable gpu-accelerated SVG/W3C filters.
337 const char kEnableAcceleratedFilters
[] = "enable-accelerated-filters";
339 // Enable bleeding-edge code to make Chrome draw content faster. The changes
340 // behind this path are very likely to break lots of content.
341 // ** DO NOT use this flag unless you know what you are doing. **
342 const char kEnableBleedingEdgeRenderingFastPaths
[] =
343 "enable-bleeding-edge-rendering-fast-paths";
345 // Disable gpu-accelerated 2d canvas.
346 const char kEnableDeferredFilters
[] = "enable-deferred-filters";
348 // Enables accelerated compositing for backgrounds of root layers with
349 // background-attachment: fixed. Requires kForceCompositingMode.
350 const char kEnableAcceleratedFixedRootBackground
[] =
351 "enable-accelerated-fixed-root-background";
353 // Enables accelerated compositing for overflow scroll. Promotes eligible
354 // overflow:scroll elements to layers to enable accelerated scrolling for them.
355 const char kEnableAcceleratedOverflowScroll
[] =
356 "enable-accelerated-overflow-scroll";
359 const char kEnableLCDText
[] = "enable-lcd-text";
361 // Enables experimental feature that maps multiple RenderLayers to
362 // one composited layer to avoid pathological layer counts.
363 const char kEnableLayerSquashing
[] =
364 "enable-layer-squashing";
366 // Turns on extremely verbose logging of accessibility events.
367 const char kEnableAccessibilityLogging
[] = "enable-accessibility-logging";
369 // Use a BeginImplFrame signal from browser to renderer to schedule rendering.
370 const char kEnableBeginFrameScheduling
[] = "enable-begin-frame-scheduling";
372 // Enables browser plugin for all types of pages.
373 const char kEnableBrowserPluginForAllViewTypes
[] =
374 "enable-browser-plugin-for-all-view-types";
376 // Enable the creation of compositing layers for fixed position
377 // elements. Three options are needed to support four possible scenarios:
378 // 1. Default (disabled)
379 // 2. Enabled always (to allow dogfooding)
380 // 3. Disabled always (to give safety fallback for users)
381 // 4. Enabled only if we detect a highDPI display
383 // Option #4 may soon be the default, because the feature is needed soon for
384 // high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will
385 // override Option #4.
386 const char kEnableCompositingForFixedPosition
[] =
387 "enable-fixed-position-compositing";
389 // Enable/Disable the creation of compositing layers for RenderLayers with a
390 // transition on a property that supports accelerated animation (that is,
391 // opacity, -webkit-transform, and -webkit-filter), even when no animation is
392 // running. These options allow for three possible scenarios:
393 // 1. Default (enabled only if we dectect a highDPI display)
394 // 2. Enabled always.
395 // 3. Disabled always.
396 const char kEnableCompositingForTransition
[] =
397 "enable-transition-compositing";
399 // Defer image decoding in WebKit until painting.
400 const char kEnableDeferredImageDecoding
[] = "enable-deferred-image-decoding";
402 // Enables delegated renderer.
403 const char kEnableDelegatedRenderer
[] = "enable-delegated-renderer";
405 // Enables restarting interrupted downloads.
406 const char kEnableDownloadResumption
[] = "enable-download-resumption";
408 // Enables running the SharedWorker inside the renderer process.
409 const char kEnableEmbeddedSharedWorker
[] = "enable-embedded-shared-worker";
411 // Enables support for Encrypted Media Extensions (e.g. MediaKeys).
412 const char kEnableEncryptedMedia
[] = "enable-encrypted-media";
414 // Enable experimental canvas features, e.g. canvas 2D context attributes
415 const char kEnableExperimentalCanvasFeatures
[] =
416 "enable-experimental-canvas-features";
418 // Enables Web Platform features that are in development.
419 const char kEnableExperimentalWebPlatformFeatures
[] =
420 "enable-experimental-web-platform-features";
422 // Enable an experimental WebSocket implementation.
423 const char kEnableExperimentalWebSocket
[] = "enable-experimental-websocket";
425 // By default, cookies are not allowed on file://. They are needed for testing,
426 // for example page cycler and layout tests. See bug 1157243.
427 const char kEnableFileCookies
[] = "enable-file-cookies";
429 // Enable the fast text autosizing implementation.
430 const char kEnableFastTextAutosizing
[] = "enable-fast-text-autosizing";
432 const char kEnableFixedPositionCreatesStackingContext
[]
433 = "enable-fixed-position-creates-stacking-context";
435 // Enable Gesture Tap Highlight
436 const char kEnableGestureTapHighlight
[] = "enable-gesture-tap-highlight";
438 // Enables TRACE for GL calls in the renderer.
439 const char kEnableGpuClientTracing
[] = "enable-gpu-client-tracing";
441 // Allow heuristics to determine when a layer tile should be drawn with the
442 // Skia GPU backend. Only valid with GPU accelerated compositing +
443 // impl-side painting.
444 const char kEnableGpuRasterization
[] = "enable-gpu-rasterization";
446 // See comment for kEnableCompositingForFixedPosition.
447 const char kEnableHighDpiCompositingForFixedPosition
[] =
448 "enable-high-dpi-fixed-position-compositing";
451 // Disable the Legacy Window which corresponds to the size of the WebContents.
452 const char kDisableLegacyIntermediateWindow
[] = "disable-legacy-window";
454 // Enables the DirectWrite font rendering system on windows.
455 const char kEnableDirectWrite
[] = "enable-direct-write";
457 // Use high resolution timers for TimeTicks.
458 const char kEnableHighResolutionTime
[] = "enable-high-resolution-time";
461 // Enable HTML Imports
462 extern const char kEnableHTMLImports
[] = "enable-html-imports";
464 // Paint content on the compositor thread instead of the main thread.
465 const char kEnableImplSidePainting
[] = "enable-impl-side-painting";
467 // Enables support for inband text tracks in media content.
468 const char kEnableInbandTextTracks
[] = "enable-inband-text-tracks";
470 // Force logging to be enabled. Logging is disabled by default in release
472 const char kEnableLogging
[] = "enable-logging";
474 // Enable rasterizer that writes directly to GPU memory.
475 const char kEnableMapImage
[] = "enable-map-image";
477 // Enables the memory benchmarking extension
478 const char kEnableMemoryBenchmarking
[] = "enable-memory-benchmarking";
480 // On Windows, converts the page to the currently-installed monitor profile.
481 // This does NOT enable color management for images. The source is still
482 // assumed to be sRGB.
483 const char kEnableMonitorProfile
[] = "enable-monitor-profile";
485 // Enables use of cache if offline, even if it's stale
486 const char kEnableOfflineCacheAccess
[] = "enable-offline-cache-access";
488 // Enables use of hardware overlay for fullscreen video playback. Android only.
489 const char kEnableOverlayFullscreenVideo
[] = "enable-overlay-fullscreen-video";
491 // Disables blink subtitle and media control on top of overlay fullscreen video.
492 const char kDisableOverlayFullscreenVideoSubtitle
[] =
493 "disable-overlay-fullscreen-video-subtitle";
495 // Forward overscroll event data from the renderer to the browser.
496 const char kEnableOverscrollNotifications
[] = "enable-overscroll-notifications";
498 // Enables compositor-accelerated touch-screen pinch gestures.
499 const char kEnablePinch
[] = "enable-pinch";
501 // Enable caching of pre-parsed JS script data. See http://crbug.com/32407.
502 const char kEnablePreparsedJsCaching
[] = "enable-preparsed-js-caching";
504 // Enable privileged WebGL extensions; without this switch such extensions are
505 // available only to Chrome extensions.
506 const char kEnablePrivilegedWebGLExtensions
[] =
507 "enable-privileged-webgl-extensions";
509 // Enables the CSS multicol implementation that uses the regions implementation.
510 const char kEnableRegionBasedColumns
[] =
511 "enable-region-based-columns";
513 // Enables the new layout/paint system which paints after layout is complete.
514 const char kEnableRepaintAfterLayout
[] =
515 "enable-repaint-after-layout";
517 // Enables targeted style recalculation optimizations.
518 const char kEnableTargetedStyleRecalc
[] =
519 "enable-targeted-style-recalc";
521 // Cause the OS X sandbox write to syslog every time an access to a resource
522 // is denied by the sandbox.
523 const char kEnableSandboxLogging
[] = "enable-sandbox-logging";
525 // Enables the Skia benchmarking extension
526 const char kEnableSkiaBenchmarking
[] = "enable-skia-benchmarking";
528 // On platforms that support it, enables smooth scroll animation.
529 const char kEnableSmoothScrolling
[] = "enable-smooth-scrolling";
531 // Allow the compositor to use its software implementation if GL fails.
532 const char kEnableSoftwareCompositing
[] = "enable-software-compositing";
534 // Enable spatial navigation
535 const char kEnableSpatialNavigation
[] = "enable-spatial-navigation";
537 // Enables the synthesis part of the Web Speech API.
538 const char kEnableSpeechSynthesis
[] = "enable-speech-synthesis";
540 // Enables StatsTable, logging statistics to a global named shared memory table.
541 const char kEnableStatsTable
[] = "enable-stats-table";
543 // Experimentally ensures that each renderer process:
544 // 1) Only handles rendering for pages from a single site, apart from iframes.
545 // (Note that a page can reference content from multiple origins due to images,
546 // JavaScript files, etc. Cross-site iframes are also loaded in-process.)
547 // 2) Only has authority to see or use cookies for the page's top-level origin.
548 // (So if a.com iframes b.com, the b.com network request will be sent without
550 // This is expected to break compatibility with many pages for now. Unlike the
551 // --site-per-process flag, this allows cross-site iframes, but it blocks all
552 // cookies on cross-site requests.
553 const char kEnableStrictSiteIsolation
[] = "enable-strict-site-isolation";
555 // Enable support for ServiceWorker. See
556 // https://github.com/slightlyoff/ServiceWorker for more information.
557 const char kEnableServiceWorker
[] = "enable-service-worker";
559 // Enable use of experimental TCP sockets API for sending data in the
561 const char kEnableTcpFastOpen
[] = "enable-tcp-fastopen";
563 // Enable multithreaded GPU compositing of web content.
564 const char kEnableThreadedCompositing
[] = "enable-threaded-compositing";
566 // Enable accelerated overflow scrolling in all cases.
567 const char kEnableUniversalAcceleratedOverflowScroll
[] =
568 "enable-universal-accelerated-overflow-scroll";
570 // Enable screen capturing support for MediaStream API.
571 const char kEnableUserMediaScreenCapturing
[] =
572 "enable-usermedia-screen-capturing";
574 // Enables the use of the @viewport CSS rule, which allows
575 // pages to control aspects of their own layout. This also turns on touch-screen
577 const char kEnableViewport
[] = "enable-viewport";
579 // Enables the use of the legacy viewport meta tag. Turning this on also
580 // turns on the @viewport CSS rule
581 const char kEnableViewportMeta
[] = "enable-viewport-meta";
583 // Resizes of the main frame are the caused by changing between landscape
584 // and portrait mode (i.e. Android) so the page should be rescaled to fit
585 const char kMainFrameResizesAreOrientationChanges
[] =
586 "main-frame-resizes-are-orientation-changes";
588 // Enables moving cursor by word in visual order.
589 const char kEnableVisualWordMovement
[] = "enable-visual-word-movement";
591 // Enable the Vtune profiler support.
592 const char kEnableVtune
[] = "enable-vtune-support";
594 // Enable SVG Animations on the Web Animations model.
595 const char kEnableWebAnimationsSVG
[] = "enable-web-animations-svg";
597 // Enables WebGL extensions not yet approved by the community.
598 const char kEnableWebGLDraftExtensions
[] = "enable-webgl-draft-extensions";
600 // Enables Web MIDI API.
601 const char kEnableWebMIDI
[] = "enable-web-midi";
603 // Load NPAPI plugins from the specified directory.
604 const char kExtraPluginDir
[] = "extra-plugin-dir";
606 // If accelerated compositing is supported, always enter compositing mode for
607 // the base layer even when compositing is not strictly required.
608 const char kForceCompositingMode
[] = "force-compositing-mode";
610 // Some field trials may be randomized in the browser, and the randomly selected
611 // outcome needs to be propagated to the renderer. For instance, this is used
612 // to modify histograms recorded in the renderer, or to get the renderer to
613 // also set of its state (initialize, or not initialize components) to match the
614 // experiment(s). The option is also useful for forcing field trials when
615 // testing changes locally. The argument is a list of name and value pairs,
616 // separated by slashes. See FieldTrialList::CreateTrialsFromString() in
617 // field_trial.h for details.
618 const char kForceFieldTrials
[] = "force-fieldtrials";
620 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
621 // accelerated compositing + impl-side painting. Overrides the
622 // kEnableGpuRasterization flag.
623 const char kForceGpuRasterization
[] = "force-gpu-rasterization";
625 // Force renderer accessibility to be on instead of enabling it on demand when
626 // a screen reader is detected. The disable-renderer-accessibility switch
627 // overrides this if present.
628 const char kForceRendererAccessibility
[] = "force-renderer-accessibility";
630 // Passes gpu device_id from browser process to GPU process.
631 const char kGpuDeviceID
[] = "gpu-device-id";
633 // Passes gpu driver_vendor from browser process to GPU process.
634 const char kGpuDriverVendor
[] = "gpu-driver-vendor";
636 // Passes gpu driver_version from browser process to GPU process.
637 const char kGpuDriverVersion
[] = "gpu-driver-version";
639 // Extra command line options for launching the GPU process (normally used
640 // for debugging). Use like renderer-cmd-prefix.
641 const char kGpuLauncher
[] = "gpu-launcher";
643 // Makes this process a GPU sub-process.
644 const char kGpuProcess
[] = "gpu-process";
646 // Allow shmat system call in GPU sandbox.
647 const char kGpuSandboxAllowSysVShm
[] = "gpu-sandbox-allow-sysv-shm";
649 // Makes GPU sandbox failures fatal.
650 const char kGpuSandboxFailuresFatal
[] = "gpu-sandbox-failures-fatal";
652 // Causes the GPU process to display a dialog on launch.
653 const char kGpuStartupDialog
[] = "gpu-startup-dialog";
655 // Passes gpu vendor_id from browser process to GPU process.
656 const char kGpuVendorID
[] = "gpu-vendor-id";
658 // These mappings only apply to the host resolver.
659 const char kHostResolverRules
[] = "host-resolver-rules";
661 // Ignores certificate-related errors.
662 const char kIgnoreCertificateErrors
[] = "ignore-certificate-errors";
664 // Ignores GPU blacklist.
665 const char kIgnoreGpuBlacklist
[] = "ignore-gpu-blacklist";
667 // Run the GPU process as a thread in the browser process.
668 const char kInProcessGPU
[] = "in-process-gpu";
670 // These mappings only apply to the host resolver, and can insert additional
671 // resolutions in front of resolutions that match a pattern.
672 const char kIpResolverRules
[] = "ip-resolver-rules";
674 // Specifies the flags passed to JS engine
675 const char kJavaScriptFlags
[] = "js-flags";
677 // Load an NPAPI plugin from the specified path.
678 const char kLoadPlugin
[] = "load-plugin";
680 // Logs GPU control list decisions when enforcing blacklist rules.
681 const char kLogGpuControlListDecisions
[] = "log-gpu-control-list-decisions";
683 // Sets the minimum log level. Valid values are from 0 to 3:
684 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
685 const char kLoggingLevel
[] = "log-level";
687 // Enables saving net log events to a file and sets the file name to use.
688 const char kLogNetLog
[] = "log-net-log";
690 // Make plugin processes log their sent and received messages to VLOG(1).
691 const char kLogPluginMessages
[] = "log-plugin-messages";
693 // Sets the width and height above which a composited layer will get tiled.
694 const char kMaxUntiledLayerHeight
[] = "max-untiled-layer-height";
695 const char kMaxUntiledLayerWidth
[] = "max-untiled-layer-width";
697 // Sample memory usage with high frequency and store the results to the
698 // Renderer.Memory histogram. Used in memory tests.
699 const char kMemoryMetrics
[] = "memory-metrics";
701 // Mutes audio sent to the audio device so it is not audible during
702 // automated testing.
703 const char kMuteAudio
[] = "mute-audio";
705 // Don't send HTTP-Referer headers.
706 const char kNoReferrers
[] = "no-referrers";
708 // Disables the sandbox for all process types that are normally sandboxed.
709 const char kNoSandbox
[] = "no-sandbox";
711 // Number of worker threads used to rasterize content.
712 const char kNumRasterThreads
[] = "num-raster-threads";
714 // Enables or disables history navigation in response to horizontal overscroll.
715 // Set the value to '1' to enable the feature, and set to '0' to disable.
716 // Defaults to enabled.
717 const char kOverscrollHistoryNavigation
[] =
718 "overscroll-history-navigation";
720 // Specifies a command that should be used to launch the plugin process. Useful
721 // for running the plugin process through purify or quantify. Ex:
722 // --plugin-launcher="path\to\purify /Run=yes"
723 const char kPluginLauncher
[] = "plugin-launcher";
725 // Tells the plugin process the path of the plugin to load
726 const char kPluginPath
[] = "plugin-path";
728 // Causes the process to run as a plugin subprocess.
729 const char kPluginProcess
[] = "plugin";
731 // Causes the plugin process to display a dialog on launch.
732 const char kPluginStartupDialog
[] = "plugin-startup-dialog";
734 // Argument to the process type that indicates a PPAPI broker process type.
735 const char kPpapiBrokerProcess
[] = "ppapi-broker";
737 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
738 const char kPpapiFlashArgs
[] = "ppapi-flash-args";
740 // Runs PPAPI (Pepper) plugins in-process.
741 const char kPpapiInProcess
[] = "ppapi-in-process";
743 // Like kPluginLauncher for PPAPI plugins.
744 const char kPpapiPluginLauncher
[] = "ppapi-plugin-launcher";
746 // Argument to the process type that indicates a PPAPI plugin process type.
747 const char kPpapiPluginProcess
[] = "ppapi";
749 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
750 // --no-sandbox as well or the sandbox won't allow the dialog to display.
751 const char kPpapiStartupDialog
[] = "ppapi-startup-dialog";
753 // Runs a single process for each site (i.e., group of pages from the same
754 // registered domain) the user visits. We default to using a renderer process
755 // for each site instance (i.e., group of pages from the same registered
756 // domain with script connections to each other).
757 const char kProcessPerSite
[] = "process-per-site";
759 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
760 // renderer process. We default to using a renderer process for each
761 // site instance (i.e., group of pages from the same registered domain with
762 // script connections to each other).
763 const char kProcessPerTab
[] = "process-per-tab";
765 // The value of this switch determines whether the process is started as a
766 // renderer or plugin host. If it's empty, it's the browser.
767 const char kProcessType
[] = "type";
769 // Enables more web features over insecure connections. Designed to be used
770 // for testing purposes only.
771 const char kReduceSecurityForTesting
[] = "reduce-security-for-testing";
773 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
774 const char kRegisterPepperPlugins
[] = "register-pepper-plugins";
776 // Enables remote debug over HTTP on the specified port.
777 const char kRemoteDebuggingPort
[] = "remote-debugging-port";
779 // Causes the renderer process to throw an assertion on launch.
780 const char kRendererAssertTest
[] = "renderer-assert-test";
782 // On POSIX only: the contents of this flag are prepended to the renderer
783 // command line. Useful values might be "valgrind" or "xterm -e gdb --args".
784 const char kRendererCmdPrefix
[] = "renderer-cmd-prefix";
786 // Causes the process to run as renderer instead of as browser.
787 const char kRendererProcess
[] = "renderer";
789 // Overrides the default/calculated limit to the number of renderer processes.
790 // Very high values for this setting can lead to high memory/resource usage
792 const char kRendererProcessLimit
[] = "renderer-process-limit";
794 // Causes the renderer process to display a dialog on launch.
795 const char kRendererStartupDialog
[] = "renderer-startup-dialog";
797 // Causes the process to run as a sandbox IPC subprocess.
798 const char kSandboxIPCProcess
[] = "sandbox-ipc";
800 // Enables or disables scroll end effect in response to vertical overscroll.
801 // Set the value to '1' to enable the feature, and set to '0' to disable.
802 // Defaults to disabled.
803 const char kScrollEndEffect
[] = "scroll-end-effect";
805 // Visibly render a border around paint rects in the web page to help debug
806 // and study painting behavior.
807 const char kShowPaintRects
[] = "show-paint-rects";
809 // Map mouse input events into touch gesture events. Useful for debugging touch
810 // gestures without needing a touchscreen.
811 const char kSimulateTouchScreenWithMouse
[] =
812 "simulate-touch-screen-with-mouse";
814 // Runs the renderer and plugins in the same process as the browser
815 const char kSingleProcess
[] = "single-process";
817 // Experimentally enforces a one-site-per-process security policy.
818 // All cross-site navigations force process swaps, and we can restrict a
819 // renderer process's access rights based on its site. For details, see:
820 // http://www.chromium.org/developers/design-documents/site-isolation
822 // Unlike --enable-strict-site-isolation (which allows cross-site iframes),
823 // this flag does not affect which cookies are attached to cross-site requests.
824 // Support is being added to render cross-site iframes in a different process
825 // than their parent pages.
826 const char kSitePerProcess
[] = "site-per-process";
828 // Skip gpu info collection, blacklist loading, and blacklist auto-update
829 // scheduling at browser startup time.
830 // Therefore, all GPU features are available, and about:gpu page shows empty
831 // content. The switch is intended only for layout tests.
832 // TODO(gab): Get rid of this switch entirely.
833 const char kSkipGpuDataLoading
[] = "skip-gpu-data-loading";
835 // Specifies if the browser should start in fullscreen mode, like if the user
836 // had pressed F11 right after startup.
837 const char kStartFullscreen
[] = "start-fullscreen";
839 // Specifies if the |StatsCollectionController| needs to be bound in the
840 // renderer. This binding happens on per-frame basis and hence can potentially
841 // be a performance bottleneck. One should only enable it when running a test
842 // that needs to access the provided statistics.
843 const char kStatsCollectionController
[] =
844 "enable-stats-collection-bindings";
846 // Upscale defaults to "good".
847 const char kTabCaptureDownscaleQuality
[] = "tab-capture-downscale-quality";
849 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
850 // One flag for upscaling, one for downscaling.
851 // Upscale defaults to "best".
852 const char kTabCaptureUpscaleQuality
[] = "tab-capture-upscale-quality";
854 // Allows for forcing socket connections to http/https to use fixed ports.
855 const char kTestingFixedHttpPort
[] = "testing-fixed-http-port";
856 const char kTestingFixedHttpsPort
[] = "testing-fixed-https-port";
858 // Runs the security test for the renderer sandbox.
859 const char kTestSandbox
[] = "test-sandbox";
861 // Type of the current test harness ("browser" or "ui").
862 const char kTestType
[] = "test-type";
864 // Enable timeout-based touch event cancellation if a touch ack is delayed.
865 // If unspecified, touch timeout behavior will be disabled.
866 const char kTouchAckTimeoutDelayMs
[] = "touch-ack-timeout-delay-ms";
868 const char kTouchScrollingMode
[] = "touch-scrolling-mode";
869 const char kTouchScrollingModeTouchcancel
[] = "touchcancel";
870 const char kTouchScrollingModeSyncTouchmove
[] = "sync-touchmove";
871 const char kTouchScrollingModeAbsorbTouchmove
[] = "absorb-touchmove";
873 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
874 // can specify the specific trace categories to include (e.g.
875 // --trace-shutdown=base,net) otherwise, all events are recorded.
876 // --trace-shutdown-file can be used to control where the trace log gets stored
877 // to since there is otherwise no way to access the result.
878 const char kTraceShutdown
[] = "trace-shutdown";
880 // If supplied, sets the file which shutdown tracing will be stored into, if
881 // omitted the default will be used "chrometrace.log" in the current directory.
882 // Has no effect unless --trace-shutdown is also supplied.
883 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
884 const char kTraceShutdownFile
[] = "trace-shutdown-file";
886 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
887 // specify the specific trace categories to include (e.g.
888 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
889 // flag results in the first call to BeginTracing() to receive all trace events
890 // since startup. In Chrome, you may find --trace-startup-file and
891 // --trace-startup-duration to control the auto-saving of the trace (not
892 // supported in the base-only TraceLog component).
893 const char kTraceStartup
[] = "trace-startup";
895 // Sets the time in seconds until startup tracing ends. If omitted a default of
896 // 5 seconds is used. Has no effect without --trace-startup, or if
897 // --startup-trace-file=none was supplied.
898 const char kTraceStartupDuration
[] = "trace-startup-duration";
900 // If supplied, sets the file which startup tracing will be stored into, if
901 // omitted the default will be used "chrometrace.log" in the current directory.
902 // Has no effect unless --trace-startup is also supplied.
903 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
904 // As a special case, can be set to 'none' - this disables automatically saving
905 // the result to a file and the first manually recorded trace will then receive
906 // all events since startup.
907 const char kTraceStartupFile
[] = "trace-startup-file";
911 // Prioritizes the UI's command stream in the GPU process
912 extern const char kUIPrioritizeInGpuProcess
[] =
913 "ui-prioritize-in-gpu-process";
915 // Overrides the preferred discardable memory implementation.
916 const char kUseDiscardableMemory
[] = "use-discardable-memory";
918 // Use fake device for MediaStream to replace actual camera and microphone.
919 const char kUseFakeDeviceForMediaStream
[] = "use-fake-device-for-media-stream";
921 // Bypass the media stream infobar by selecting the default device for media
922 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
923 const char kUseFakeUIForMediaStream
[] = "use-fake-ui-for-media-stream";
925 // Set when Chromium should use a mobile user agent.
926 const char kUseMobileUserAgent
[] = "use-mobile-user-agent";
928 // On POSIX only: the contents of this flag are prepended to the utility
929 // process command line. Useful values might be "valgrind" or "xterm -e gdb
931 const char kUtilityCmdPrefix
[] = "utility-cmd-prefix";
933 // Causes the process to run as a utility subprocess.
934 const char kUtilityProcess
[] = "utility";
936 // The utility process is sandboxed, with access to one directory. This flag
937 // specifies the directory that can be accessed.
938 const char kUtilityProcessAllowedDir
[] = "utility-allowed-dir";
940 // Allows MDns to access network in sandboxed process.
941 const char kUtilityProcessEnableMDns
[] = "utility-enable-mdns";
943 const char kUtilityProcessRunningElevated
[] = "utility-run-elevated";
945 // In debug builds, asserts that the stream of input events is valid.
946 const char kValidateInputEventStream
[] = "validate-input-event-stream";
948 // Will add kWaitForDebugger to every child processes. If a value is passed, it
949 // will be used as a filter to determine if the child process should have the
950 // kWaitForDebugger flag passed on or not.
951 const char kWaitForDebuggerChildren
[] = "wait-for-debugger-children";
953 // Overrides the amount of shared memory the webgl command buffer allocates
954 const char kWebGLCommandBufferSizeKb
[] = "webgl-command-buffer-size-kb";
956 // Causes the process to run as a worker subprocess.
957 const char kWorkerProcess
[] = "worker";
959 // The prefix used when starting the zygote process. (i.e. 'gdb --args')
960 const char kZygoteCmdPrefix
[] = "zygote-cmd-prefix";
962 // Causes the process to run as a renderer zygote.
963 const char kZygoteProcess
[] = "zygote";
965 #if defined(ENABLE_WEBRTC)
966 // Enables audio processing in a MediaStreamTrack. When this flag is on, AEC,
967 // NS and AGC will be done per MediaStreamTrack instead of in PeerConnection.
968 const char kEnableAudioTrackProcessing
[] = "enable-audio-track-processing";
970 // Disables WebRTC device enumeration.
971 const char kDisableDeviceEnumeration
[] = "disable-device-enumeration";
973 // Disables HW decode acceleration for WebRTC.
974 const char kDisableWebRtcHWDecoding
[] = "disable-webrtc-hw-decoding";
976 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
977 // ignores this switch on its stable and beta channels.
978 const char kDisableWebRtcEncryption
[] = "disable-webrtc-encryption";
980 // Disables HW encode acceleration for WebRTC.
981 const char kDisableWebRtcHWEncoding
[] = "disable-webrtc-hw-encoding";
983 // Enables WebRTC AEC recordings.
984 const char kEnableWebRtcAecRecordings
[] = "enable-webrtc-aec-recordings";
986 // Enables WebRTC to open TCP server sockets.
987 const char kEnableWebRtcTcpServerSocket
[] = "enable-webrtc-tcp-server-socket";
989 // Enables VP8 HW encode acceleration for WebRTC.
990 const char kEnableWebRtcHWVp8Encoding
[] = "enable-webrtc-hw-vp8-encoding";
993 #if defined(OS_ANDROID)
994 // Disable user gesture requirement for the media element to enter fullscreen.
995 const char kDisableGestureRequirementForMediaFullscreen
[] =
996 "disable-gesture-requirement-for-media-fullscreen";
998 // Disable user gesture requirement for media playback.
999 const char kDisableGestureRequirementForMediaPlayback
[] =
1000 "disable-gesture-requirement-for-media-playback";
1002 // Disable history logging for media elements.
1003 const char kDisableMediaHistoryLogging
[] = "disable-media-history";
1005 // Disable the click delay by sending click events during double tap.
1006 const char kDisableClickDelay
[] = "disable-click-delay";
1008 // Disable overscroll edge effects like those found in Android views.
1009 const char kDisableOverscrollEdgeEffect
[] = "disable-overscroll-edge-effect";
1011 // WebRTC is enabled by default on Android.
1012 const char kDisableWebRTC
[] = "disable-webrtc";
1014 // Enable the recognition part of the Web Speech API.
1015 const char kEnableSpeechRecognition
[] = "enable-speech-recognition";
1017 // The telephony region (ISO country code) to use in phone number detection.
1018 const char kNetworkCountryIso
[] = "network-country-iso";
1020 // Enables remote debug over HTTP on the specified socket name.
1021 const char kRemoteDebuggingSocketName
[] = "remote-debugging-socket-name";
1024 #if defined(OS_ANDROID) && defined(ARCH_CPU_X86)
1025 const char kEnableWebAudio
[] = "enable-webaudio";
1027 // Disable web audio API.
1028 const char kDisableWebAudio
[] = "disable-webaudio";
1031 #if defined(OS_CHROMEOS)
1032 // Disables panel fitting (used for mirror mode).
1033 const char kDisablePanelFitting
[] = "disable-panel-fitting";
1036 #if defined(OS_MACOSX) && !defined(OS_IOS)
1037 const char kEnableCarbonInterposing
[] = "enable-carbon-interposing";
1039 // Disables support for Core Animation plugins. This is triggered when
1040 // accelerated compositing is disabled. See http://crbug.com/122430 .
1041 const char kDisableCoreAnimationPlugins
[] =
1042 "disable-core-animation-plugins";
1045 #if defined(OS_POSIX)
1046 // Causes the child processes to cleanly exit via calling exit().
1047 const char kChildCleanExit
[] = "child-clean-exit";
1050 // Don't dump stuff here, follow the same order as the header.
1052 } // namespace switches