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. 4 5 #include "content/public/common/content_switches.h" 6 7 #include "base/command_line.h" 8 9 namespace switches { 10 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"; 14 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"; 18 19 // Allows frames with an https origin to use WebSockets with an insecure URL 20 // (ws://). 21 const char kAllowInsecureWebSocketFromHttpsOrigin[] = 22 "allow-insecure-websocket-from-https-origin"; 23 24 // Allows loopback interface to be added in network list for peer connection. 25 const char kAllowLoopbackInPeerConnection[] = 26 "allow-loopback-in-peer-connection"; 27 28 // Enables the sandboxed processes to run without a job object assigned to them. 29 // This flag is required to allow Chrome to run in RemoteApps or Citrix. This 30 // flag can reduce the security of the sandboxed processes and allow them to do 31 // certain API calls like shut down Windows or access the clipboard. Also we 32 // lose the chance to kill some processes until the outer job that owns them 33 // finishes. 34 const char kAllowNoSandboxJob[] = "allow-no-sandbox-job"; 35 36 // Allows debugging of sandboxed processes (see zygote_main_linux.cc). 37 const char kAllowSandboxDebugging[] = "allow-sandbox-debugging"; 38 39 // The same as kAuditHandles except all handles are enumerated. 40 const char kAuditAllHandles[] = "enable-handle-auditing-all"; 41 42 // Enumerates and prints a child process' most dangerous handles when it 43 // is terminated. 44 const char kAuditHandles[] = "enable-handle-auditing"; 45 46 // Choose which logging channels in blink platform to activate. See 47 // Logging.cpp in blink's Source/platform for a list of available channels. 48 const char kBlinkPlatformLogChannels[] = "blink-platform-log-channels"; 49 50 // Block cross-site documents (i.e., HTML/XML/JSON) from being loaded in 51 // subresources when a document is not supposed to read them. This will later 52 // allow us to block them from the entire renderer process when site isolation 53 // is enabled. 54 const char kBlockCrossSiteDocuments[] = "block-cross-site-documents"; 55 56 // Causes the browser process to throw an assertion on startup. 57 const char kBrowserAssertTest[] = "assert-test"; 58 59 // Causes the browser process to crash on startup. 60 const char kBrowserCrashTest[] = "crash-test"; 61 62 // Path to the exe to run for the renderer and plugin subprocesses. 63 const char kBrowserSubprocessPath[] = "browser-subprocess-path"; 64 65 // Dumps extra logging about plugin loading to the log file. 66 const char kDebugPluginLoading[] = "debug-plugin-loading"; 67 68 // Sets the tile size used by composited layers. 69 const char kDefaultTileWidth[] = "default-tile-width"; 70 const char kDefaultTileHeight[] = "default-tile-height"; 71 72 // Disable antialiasing on 2d canvas. 73 const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa"; 74 75 // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D. 76 // This is controlled by policy and is kept separate from the other 77 // enable/disable switches to avoid accidentally regressing the policy 78 // support for controlling access to these APIs. 79 const char kDisable3DAPIs[] = "disable-3d-apis"; 80 81 // Disable gpu-accelerated 2d canvas. 82 const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas"; 83 84 // Disables accelerated compositing for backgrounds of root layers with 85 // background-attachment: fixed. 86 const char kDisableAcceleratedFixedRootBackground[] = 87 "disable-accelerated-fixed-root-background"; 88 89 // Disables accelerated compositing for overflow scroll. 90 const char kDisableAcceleratedOverflowScroll[] = 91 "disable-accelerated-overflow-scroll"; 92 93 // Disables layer squashing. 94 const char kDisableLayerSquashing[] = 95 "disable-layer-squashing"; 96 97 // Disables hardware acceleration of video decode, where available. 98 const char kDisableAcceleratedVideoDecode[] = 99 "disable-accelerated-video-decode"; 100 101 // Disable the ApplicationCache. 102 const char kDisableApplicationCache[] = "disable-application-cache"; 103 104 // Disable limits on the number of backing stores. Can prevent blinking for 105 // users with many windows/tabs and lots of memory. 106 const char kDisableBackingStoreLimit[] = "disable-backing-store-limit"; 107 108 // See comment for kEnableCompositingForFixedPosition. 109 const char kDisableCompositingForFixedPosition[] = 110 "disable-fixed-position-compositing"; 111 112 // See comment for kEnableCompositingForTransition. 113 const char kDisableCompositingForTransition[] = 114 "disable-transition-compositing"; 115 116 // Disables HTML5 DB support. 117 const char kDisableDatabases[] = "disable-databases"; 118 119 // Disables delegated renderer. 120 const char kDisableDelegatedRenderer[] = "disable-delegated-renderer"; 121 122 // Disables desktop notifications (default enabled on windows). 123 const char kDisableDesktopNotifications[] = "disable-desktop-notifications"; 124 125 // Disables experimental navigator content utils implementation. 126 const char kDisableNavigatorContentUtils[] = 127 "disable-navigator-content-utils"; 128 129 // Handles URL requests by NPAPI plugins through the renderer. 130 const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests"; 131 132 // Disable the per-domain blocking for 3D APIs after GPU reset. 133 // This switch is intended only for tests. 134 extern const char kDisableDomainBlockingFor3DAPIs[] = 135 "disable-domain-blocking-for-3d-apis"; 136 137 // Disable running the SharedWorker inside the renderer process. 138 const char kDisableEmbeddedSharedWorker[] = "disable-embedded-shared-worker"; 139 140 // Disable experimental WebGL support. 141 const char kDisableExperimentalWebGL[] = "disable-webgl"; 142 143 // Disable the fast text autosizing implementation. 144 const char kDisableFastTextAutosizing[] = "disable-fast-text-autosizing"; 145 146 // Disable FileSystem API. 147 const char kDisableFileSystem[] = "disable-file-system"; 148 149 // Disable 3D inside of flapper. 150 const char kDisableFlash3d[] = "disable-flash-3d"; 151 152 // Disable Stage3D inside of flapper. 153 const char kDisableFlashStage3d[] = "disable-flash-stage3d"; 154 155 const char kDisableGestureTapHighlight[] = "disable-gesture-tap-highlight"; 156 157 // Disables GPU hardware acceleration. If software renderer is not in place, 158 // then the GPU process won't launch. 159 const char kDisableGpu[] = "disable-gpu"; 160 161 // Prevent the compositor from using its GPU implementation. 162 const char kDisableGpuCompositing[] = "disable-gpu-compositing"; 163 164 // Disable the limit on the number of times the GPU process may be restarted 165 // This switch is intended only for tests. 166 extern const char kDisableGpuProcessCrashLimit[] = 167 "disable-gpu-process-crash-limit"; 168 169 // Disable GPU rasterization, i.e. rasterize on the CPU only. 170 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags. 171 const char kDisableGpuRasterization[] = "disable-gpu-rasterization"; 172 173 // When using CPU rasterizing disable low resolution tiling. This uses 174 // less power, particularly during animations, but more white may be seen 175 // during fast scrolling especially on slower devices. 176 const char kDisableLowResTiling[] = "disable-low-res-tiling"; 177 178 // Disable the GPU process sandbox. 179 const char kDisableGpuSandbox[] = "disable-gpu-sandbox"; 180 181 // Disable the thread that crashes the GPU process if it stops responding to 182 // messages. 183 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; 184 185 // Suppresses hang monitor dialogs in renderer processes. This may allow slow 186 // unload handlers on a page to prevent the tab from closing, but the Task 187 // Manager can be used to terminate the offending process in this case. 188 const char kDisableHangMonitor[] = "disable-hang-monitor"; 189 190 // Disable the RenderThread's HistogramCustomizer. 191 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer"; 192 193 // Paint content on the main thread instead of the compositor thread. 194 // Overrides the kEnableImplSidePainting flag. 195 const char kDisableImplSidePainting[] = "disable-impl-side-painting"; 196 197 // Prevent Java from running. 198 const char kDisableJava[] = "disable-java"; 199 200 // Don't execute JavaScript (browser JS like the new tab page still runs). 201 const char kDisableJavaScript[] = "disable-javascript"; 202 203 // Don't kill a child process when it sends a bad IPC message. Apart 204 // from testing, it is a bad idea from a security perspective to enable 205 // this switch. 206 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc"; 207 208 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()). 209 const char kDisablePrefixedEncryptedMedia[] = 210 "disable-prefixed-encrypted-media"; 211 212 // Disables LCD text. 213 const char kDisableLCDText[] = "disable-lcd-text"; 214 215 // Disables distance field text. 216 const char kDisableDistanceFieldText[] = "disable-distance-field-text"; 217 218 // Disable LocalStorage. 219 const char kDisableLocalStorage[] = "disable-local-storage"; 220 221 // Force logging to be disabled. Logging is enabled by default in debug 222 // builds. 223 const char kDisableLogging[] = "disable-logging"; 224 225 // Disables Media Source API (i.e., the MediaSource object). 226 const char kDisableMediaSource[] = "disable-media-source"; 227 228 // Disable Pepper3D. 229 const char kDisablePepper3d[] = "disable-pepper-3d"; 230 231 // Disables compositor-accelerated touch-screen pinch gestures. 232 const char kDisablePinch[] = "disable-pinch"; 233 234 // Prevent plugins from running. 235 const char kDisablePlugins[] = "disable-plugins"; 236 237 // Disable discovering third-party plug-ins. Effectively loading only 238 // ones shipped with the browser plus third-party ones as specified by 239 // --extra-plugin-dir and --load-plugin switches. 240 const char kDisablePluginsDiscovery[] = "disable-plugins-discovery"; 241 242 // Disables remote web font support. SVG font should always work whether this 243 // option is specified or not. 244 const char kDisableRemoteFonts[] = "disable-remote-fonts"; 245 246 // Turns off the accessibility in the renderer. 247 const char kDisableRendererAccessibility[] = "disable-renderer-accessibility"; 248 249 // Disables the new layout/paint system which paints after layout is complete. 250 const char kDisableRepaintAfterLayout[] = "disable-repaint-after-layout"; 251 252 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only). 253 const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox"; 254 255 // Disable session storage. 256 const char kDisableSessionStorage[] = "disable-session-storage"; 257 258 // Disable the setuid sandbox (Linux only). 259 const char kDisableSetuidSandbox[] = "disable-setuid-sandbox"; 260 261 // Enable shared workers. Functionality not yet complete. 262 const char kDisableSharedWorkers[] = "disable-shared-workers"; 263 264 // Disables site-specific tailoring to compatibility issues in WebKit. 265 const char kDisableSiteSpecificQuirks[] = "disable-site-specific-quirks"; 266 267 // Disable smooth scrolling for testing. 268 const char kDisableSmoothScrolling[] = "disable-smooth-scrolling"; 269 270 // Disables the use of a 3D software rasterizer. 271 const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer"; 272 273 // Disable False Start in SSL and TLS connections. 274 const char kDisableSSLFalseStart[] = "disable-ssl-false-start"; 275 276 // Disable multithreaded GPU compositing of web content. 277 const char kDisableThreadedCompositing[] = "disable-threaded-compositing"; 278 279 // Don't enforce the same-origin policy. (Used by people testing their sites.) 280 const char kDisableWebSecurity[] = "disable-web-security"; 281 282 // Disables support for XSLT. 283 const char kDisableXSLT[] = "disable-xslt"; 284 285 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS. 286 const char kDisableXSSAuditor[] = "disable-xss-auditor"; 287 288 // Disable rasterizer that writes directly to GPU memory associated with tiles. 289 // Overrides the kEnableZeroCopy flag. 290 const char kDisableZeroCopy[] = "disable-zero-copy"; 291 292 // Specifies if the |DOMAutomationController| needs to be bound in the 293 // renderer. This binding happens on per-frame basis and hence can potentially 294 // be a performance bottleneck. One should only enable it when automating dom 295 // based tests. 296 const char kDomAutomationController[] = "dom-automation"; 297 298 // Enable bleeding-edge code to make Chrome draw content faster. The changes 299 // behind this path are very likely to break lots of content. 300 // ** DO NOT use this flag unless you know what you are doing. ** 301 const char kEnableBleedingEdgeRenderingFastPaths[] = 302 "enable-bleeding-edge-rendering-fast-paths"; 303 304 // Disable deferred image filters. 305 const char kDisableDeferredFilters[] = "disable-deferred-filters"; 306 307 // Enables accelerated compositing for backgrounds of root layers with 308 // background-attachment: fixed. 309 const char kEnableAcceleratedFixedRootBackground[] = 310 "enable-accelerated-fixed-root-background"; 311 312 // Enables accelerated compositing for overflow scroll. Promotes eligible 313 // overflow:scroll elements to layers to enable accelerated scrolling for them. 314 const char kEnableAcceleratedOverflowScroll[] = 315 "enable-accelerated-overflow-scroll"; 316 317 // Enables LCD text. 318 const char kEnableLCDText[] = "enable-lcd-text"; 319 320 // Enables using signed distance fields when rendering text. 321 // Only valid if GPU rasterization is enabled as well. 322 const char kEnableDistanceFieldText[] = "enable-distance-field-text"; 323 324 // Enables experimental feature that maps multiple RenderLayers to 325 // one composited layer to avoid pathological layer counts. 326 const char kEnableLayerSquashing[] = 327 "enable-layer-squashing"; 328 329 // Enable experimental container node culling. 330 const char kEnableContainerCulling[] = "enable-container-culling"; 331 332 // Use a BeginFrame signal from browser to renderer to schedule rendering. 333 const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling"; 334 335 // Enable the creation of compositing layers for fixed position 336 // elements. Three options are needed to support four possible scenarios: 337 // 1. Default (disabled) 338 // 2. Enabled always (to allow dogfooding) 339 // 3. Disabled always (to give safety fallback for users) 340 // 4. Enabled only if we detect a highDPI display 341 // 342 // Option #4 may soon be the default, because the feature is needed soon for 343 // high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will 344 // override Option #4. 345 const char kEnableCompositingForFixedPosition[] = 346 "enable-fixed-position-compositing"; 347 348 // Enable/Disable the creation of compositing layers for RenderLayers with a 349 // transition on a property that supports accelerated animation (that is, 350 // opacity, -webkit-transform, and -webkit-filter), even when no animation is 351 // running. These options allow for three possible scenarios: 352 // 1. Default (enabled only if we dectect a highDPI display) 353 // 2. Enabled always. 354 // 3. Disabled always. 355 const char kEnableCompositingForTransition[] = 356 "enable-transition-compositing"; 357 358 // Defer image decoding in WebKit until painting. 359 const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding"; 360 361 // Enables delegated renderer. 362 const char kEnableDelegatedRenderer[] = "enable-delegated-renderer"; 363 364 // Enables restarting interrupted downloads. 365 const char kEnableDownloadResumption[] = "enable-download-resumption"; 366 367 // Enables support for Encrypted Media Extensions (e.g. MediaKeys). 368 const char kEnableEncryptedMedia[] = "enable-encrypted-media"; 369 370 // Enable experimental canvas features, e.g. canvas 2D context attributes 371 const char kEnableExperimentalCanvasFeatures[] = 372 "enable-experimental-canvas-features"; 373 374 // Enables Web Platform features that are in development. 375 const char kEnableExperimentalWebPlatformFeatures[] = 376 "enable-experimental-web-platform-features"; 377 378 // By default, cookies are not allowed on file://. They are needed for testing, 379 // for example page cycler and layout tests. See bug 1157243. 380 const char kEnableFileCookies[] = "enable-file-cookies"; 381 382 // Enable the fast text autosizing implementation. 383 const char kEnableFastTextAutosizing[] = "enable-fast-text-autosizing"; 384 385 // Enable Gesture Tap Highlight 386 const char kEnableGestureTapHighlight[] = "enable-gesture-tap-highlight"; 387 388 // Enables TRACE for GL calls in the renderer. 389 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing"; 390 391 // Allow heuristics to determine when a layer tile should be drawn with the 392 // Skia GPU backend. Only valid with GPU accelerated compositing + 393 // impl-side painting. 394 const char kEnableGpuRasterization[] = "enable-gpu-rasterization"; 395 396 // When using CPU rasterizing generate low resolution tiling. Low res 397 // tiles may be displayed during fast scrolls especially on slower devices. 398 const char kEnableLowResTiling[] = "enable-low-res-tiling"; 399 400 // See comment for kEnableCompositingForFixedPosition. 401 const char kEnableHighDpiCompositingForFixedPosition[] = 402 "enable-high-dpi-fixed-position-compositing"; 403 404 // Paint content on the compositor thread instead of the main thread. 405 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; 406 407 // Enables support for inband text tracks in media content. 408 const char kEnableInbandTextTracks[] = "enable-inband-text-tracks"; 409 410 // Force logging to be enabled. Logging is disabled by default in release 411 // builds. 412 const char kEnableLogging[] = "enable-logging"; 413 414 // Enables the memory benchmarking extension 415 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking"; 416 417 // Enable rasterizer that writes directly to GPU memory. 418 const char kEnableOneCopy[] = "enable-one-copy"; 419 420 // Enables use of hardware overlay for fullscreen video playback. Android only. 421 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video"; 422 423 // Disables blink subtitle and media control on top of overlay fullscreen video. 424 const char kDisableOverlayFullscreenVideoSubtitle[] = 425 "disable-overlay-fullscreen-video-subtitle"; 426 427 // Forward overscroll event data from the renderer to the browser. 428 const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications"; 429 430 // Enables compositor-accelerated touch-screen pinch gestures. 431 const char kEnablePinch[] = "enable-pinch"; 432 433 // Make the values returned to window.performance.memory more granular and more 434 // up to date in shared worker. Without this flag, the memory information is 435 // still available, but it is bucketized and updated less frequently. This flag 436 // also applys to workers. 437 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info"; 438 439 // Enable caching of pre-parsed JS script data. See http://crbug.com/32407. 440 const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching"; 441 442 // Enables the CSS multicol implementation that uses the regions implementation. 443 const char kEnableRegionBasedColumns[] = 444 "enable-region-based-columns"; 445 446 // Enables the new layout/paint system which paints after layout is complete. 447 const char kEnableRepaintAfterLayout[] = 448 "enable-repaint-after-layout"; 449 450 // Enables targeted style recalculation optimizations. 451 const char kEnableTargetedStyleRecalc[] = 452 "enable-targeted-style-recalc"; 453 454 // Cause the OS X sandbox write to syslog every time an access to a resource 455 // is denied by the sandbox. 456 const char kEnableSandboxLogging[] = "enable-sandbox-logging"; 457 458 // Enables seccomp-bpf support for Android. Requires experimental kernel 459 // support. <http://crbug.com/166704> 460 const char kEnableSeccompFilterSandbox[] = 461 "enable-seccomp-filter-sandbox"; 462 463 // Enables the Skia benchmarking extension 464 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking"; 465 466 // On platforms that support it, enables smooth scroll animation. 467 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling"; 468 469 // Enable spatial navigation 470 const char kEnableSpatialNavigation[] = "enable-spatial-navigation"; 471 472 // Enables the synthesis part of the Web Speech API. 473 const char kEnableSpeechSynthesis[] = "enable-speech-synthesis"; 474 475 // Enables StatsTable, logging statistics to a global named shared memory table. 476 const char kEnableStatsTable[] = "enable-stats-table"; 477 478 // Experimentally ensures that each renderer process: 479 // 1) Only handles rendering for pages from a single site, apart from iframes. 480 // (Note that a page can reference content from multiple origins due to images, 481 // JavaScript files, etc. Cross-site iframes are also loaded in-process.) 482 // 2) Only has authority to see or use cookies for the page's top-level origin. 483 // (So if a.com iframes b.com, the b.com network request will be sent without 484 // cookies.) 485 // This is expected to break compatibility with many pages for now. Unlike the 486 // --site-per-process flag, this allows cross-site iframes, but it blocks all 487 // cookies on cross-site requests. 488 const char kEnableStrictSiteIsolation[] = "enable-strict-site-isolation"; 489 490 // Enable support for ServiceWorker. See 491 // https://github.com/slightlyoff/ServiceWorker for more information. 492 const char kEnableServiceWorker[] = "enable-service-worker"; 493 494 // Enable support for sync events in ServiceWorkers. 495 const char kEnableServiceWorkerSync[] = "enable-service-worker-sync"; 496 497 // Enable use of experimental TCP sockets API for sending data in the 498 // SYN packet. 499 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen"; 500 501 // Enable multithreaded GPU compositing of web content. 502 const char kEnableThreadedCompositing[] = "enable-threaded-compositing"; 503 504 // Enable screen capturing support for MediaStream API. 505 const char kEnableUserMediaScreenCapturing[] = 506 "enable-usermedia-screen-capturing"; 507 508 // Enables the use of the @viewport CSS rule, which allows 509 // pages to control aspects of their own layout. This also turns on touch-screen 510 // pinch gestures. 511 const char kEnableViewport[] = "enable-viewport"; 512 513 // Enables the use of the legacy viewport meta tag. Turning this on also 514 // turns on the @viewport CSS rule 515 const char kEnableViewportMeta[] = "enable-viewport-meta"; 516 517 // Resizes of the main frame are the caused by changing between landscape 518 // and portrait mode (i.e. Android) so the page should be rescaled to fit 519 const char kMainFrameResizesAreOrientationChanges[] = 520 "main-frame-resizes-are-orientation-changes"; 521 522 // Enable the Vtune profiler support. 523 const char kEnableVtune[] = "enable-vtune-support"; 524 525 // Enable SVG Animations on the Web Animations model. 526 const char kEnableWebAnimationsSVG[] = "enable-web-animations-svg"; 527 528 // Enables WebGL extensions not yet approved by the community. 529 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions"; 530 531 // Enables WebGL rendering into a scanout buffer for overlay support. 532 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium"; 533 534 // Enables Web MIDI API. 535 const char kEnableWebMIDI[] = "enable-web-midi"; 536 537 // Enable rasterizer that writes directly to GPU memory associated with tiles. 538 const char kEnableZeroCopy[] = "enable-zero-copy"; 539 540 // Load NPAPI plugins from the specified directory. 541 const char kExtraPluginDir[] = "extra-plugin-dir"; 542 543 // Some field trials may be randomized in the browser, and the randomly selected 544 // outcome needs to be propagated to the renderer. For instance, this is used 545 // to modify histograms recorded in the renderer, or to get the renderer to 546 // also set of its state (initialize, or not initialize components) to match the 547 // experiment(s). The option is also useful for forcing field trials when 548 // testing changes locally. The argument is a list of name and value pairs, 549 // separated by slashes. See FieldTrialList::CreateTrialsFromString() in 550 // field_trial.h for details. 551 const char kForceFieldTrials[] = "force-fieldtrials"; 552 553 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU 554 // accelerated compositing + impl-side painting. Overrides the 555 // kEnableGpuRasterization flag. 556 const char kForceGpuRasterization[] = "force-gpu-rasterization"; 557 558 // Force renderer accessibility to be on instead of enabling it on demand when 559 // a screen reader is detected. The disable-renderer-accessibility switch 560 // overrides this if present. 561 const char kForceRendererAccessibility[] = "force-renderer-accessibility"; 562 563 // Passes gpu device_id from browser process to GPU process. 564 const char kGpuDeviceID[] = "gpu-device-id"; 565 566 // Passes gpu driver_vendor from browser process to GPU process. 567 const char kGpuDriverVendor[] = "gpu-driver-vendor"; 568 569 // Passes gpu driver_version from browser process to GPU process. 570 const char kGpuDriverVersion[] = "gpu-driver-version"; 571 572 // Extra command line options for launching the GPU process (normally used 573 // for debugging). Use like renderer-cmd-prefix. 574 const char kGpuLauncher[] = "gpu-launcher"; 575 576 // Makes this process a GPU sub-process. 577 const char kGpuProcess[] = "gpu-process"; 578 579 // Allow shmat system call in GPU sandbox. 580 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm"; 581 582 // Makes GPU sandbox failures fatal. 583 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal"; 584 585 // Allow GPU sandbox to start later 586 const char kGpuSandboxStartAfterInitialization[] = 587 "gpu-sandbox-start-after-initialization"; 588 589 // Causes the GPU process to display a dialog on launch. 590 const char kGpuStartupDialog[] = "gpu-startup-dialog"; 591 592 // Passes gpu vendor_id from browser process to GPU process. 593 const char kGpuVendorID[] = "gpu-vendor-id"; 594 595 // These mappings only apply to the host resolver. 596 const char kHostResolverRules[] = "host-resolver-rules"; 597 598 // Ignores certificate-related errors. 599 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors"; 600 601 // Ignores GPU blacklist. 602 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist"; 603 604 // Run the GPU process as a thread in the browser process. 605 const char kInProcessGPU[] = "in-process-gpu"; 606 607 // Overrides the timeout, in seconds, that a child process waits for a 608 // connection from the browser before killing itself. 609 const char kIPCConnectionTimeout[] = "ipc-connection-timeout"; 610 611 // Specifies the flags passed to JS engine 612 const char kJavaScriptFlags[] = "js-flags"; 613 614 // Load an NPAPI plugin from the specified path. 615 const char kLoadPlugin[] = "load-plugin"; 616 617 // Logs GPU control list decisions when enforcing blacklist rules. 618 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions"; 619 620 // Sets the minimum log level. Valid values are from 0 to 3: 621 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3. 622 const char kLoggingLevel[] = "log-level"; 623 624 // Enables saving net log events to a file and sets the file name to use. 625 const char kLogNetLog[] = "log-net-log"; 626 627 // Make plugin processes log their sent and received messages to VLOG(1). 628 const char kLogPluginMessages[] = "log-plugin-messages"; 629 630 // Sets the width and height above which a composited layer will get tiled. 631 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height"; 632 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width"; 633 634 // Sample memory usage with high frequency and store the results to the 635 // Renderer.Memory histogram. Used in memory tests. 636 const char kMemoryMetrics[] = "memory-metrics"; 637 638 // Mutes audio sent to the audio device so it is not audible during 639 // automated testing. 640 const char kMuteAudio[] = "mute-audio"; 641 642 // Don't send HTTP-Referer headers. 643 const char kNoReferrers[] = "no-referrers"; 644 645 // Disables the sandbox for all process types that are normally sandboxed. 646 const char kNoSandbox[] = "no-sandbox"; 647 648 // Number of worker threads used to rasterize content. 649 const char kNumRasterThreads[] = "num-raster-threads"; 650 651 // Enables or disables history navigation in response to horizontal overscroll. 652 // Set the value to '1' to enable the feature, and set to '0' to disable. 653 // Defaults to enabled. 654 const char kOverscrollHistoryNavigation[] = 655 "overscroll-history-navigation"; 656 657 // Specifies a command that should be used to launch the plugin process. Useful 658 // for running the plugin process through purify or quantify. Ex: 659 // --plugin-launcher="path\to\purify /Run=yes" 660 const char kPluginLauncher[] = "plugin-launcher"; 661 662 // Tells the plugin process the path of the plugin to load 663 const char kPluginPath[] = "plugin-path"; 664 665 // Causes the process to run as a plugin subprocess. 666 const char kPluginProcess[] = "plugin"; 667 668 // Causes the plugin process to display a dialog on launch. 669 const char kPluginStartupDialog[] = "plugin-startup-dialog"; 670 671 // Argument to the process type that indicates a PPAPI broker process type. 672 const char kPpapiBrokerProcess[] = "ppapi-broker"; 673 674 // "Command-line" arguments for the PPAPI Flash; used for debugging options. 675 const char kPpapiFlashArgs[] = "ppapi-flash-args"; 676 677 // Runs PPAPI (Pepper) plugins in-process. 678 const char kPpapiInProcess[] = "ppapi-in-process"; 679 680 // Like kPluginLauncher for PPAPI plugins. 681 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher"; 682 683 // Argument to the process type that indicates a PPAPI plugin process type. 684 const char kPpapiPluginProcess[] = "ppapi"; 685 686 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use 687 // --no-sandbox as well or the sandbox won't allow the dialog to display. 688 const char kPpapiStartupDialog[] = "ppapi-startup-dialog"; 689 690 // Runs a single process for each site (i.e., group of pages from the same 691 // registered domain) the user visits. We default to using a renderer process 692 // for each site instance (i.e., group of pages from the same registered 693 // domain with script connections to each other). 694 const char kProcessPerSite[] = "process-per-site"; 695 696 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own 697 // renderer process. We default to using a renderer process for each 698 // site instance (i.e., group of pages from the same registered domain with 699 // script connections to each other). 700 const char kProcessPerTab[] = "process-per-tab"; 701 702 // The value of this switch determines whether the process is started as a 703 // renderer or plugin host. If it's empty, it's the browser. 704 const char kProcessType[] = "type"; 705 706 // Enables more web features over insecure connections. Designed to be used 707 // for testing purposes only. 708 const char kReduceSecurityForTesting[] = "reduce-security-for-testing"; 709 710 // Register Pepper plugins (see pepper_plugin_list.cc for its format). 711 const char kRegisterPepperPlugins[] = "register-pepper-plugins"; 712 713 // Enables remote debug over HTTP on the specified port. 714 const char kRemoteDebuggingPort[] = "remote-debugging-port"; 715 716 // Causes the renderer process to throw an assertion on launch. 717 const char kRendererAssertTest[] = "renderer-assert-test"; 718 719 // On POSIX only: the contents of this flag are prepended to the renderer 720 // command line. Useful values might be "valgrind" or "xterm -e gdb --args". 721 const char kRendererCmdPrefix[] = "renderer-cmd-prefix"; 722 723 // Causes the process to run as renderer instead of as browser. 724 const char kRendererProcess[] = "renderer"; 725 726 // Overrides the default/calculated limit to the number of renderer processes. 727 // Very high values for this setting can lead to high memory/resource usage 728 // or instability. 729 const char kRendererProcessLimit[] = "renderer-process-limit"; 730 731 // Causes the renderer process to display a dialog on launch. 732 const char kRendererStartupDialog[] = "renderer-startup-dialog"; 733 734 // Causes the process to run as a sandbox IPC subprocess. 735 const char kSandboxIPCProcess[] = "sandbox-ipc"; 736 737 // Enables or disables scroll end effect in response to vertical overscroll. 738 // Set the value to '1' to enable the feature, and set to '0' to disable. 739 // Defaults to disabled. 740 const char kScrollEndEffect[] = "scroll-end-effect"; 741 742 // Visibly render a border around paint rects in the web page to help debug 743 // and study painting behavior. 744 const char kShowPaintRects[] = "show-paint-rects"; 745 746 // Runs the renderer and plugins in the same process as the browser 747 const char kSingleProcess[] = "single-process"; 748 749 // Experimentally enforces a one-site-per-process security policy. 750 // All cross-site navigations force process swaps, and we can restrict a 751 // renderer process's access rights based on its site. For details, see: 752 // http://www.chromium.org/developers/design-documents/site-isolation 753 // 754 // Unlike --enable-strict-site-isolation (which allows cross-site iframes), 755 // this flag does not affect which cookies are attached to cross-site requests. 756 // Support is being added to render cross-site iframes in a different process 757 // than their parent pages. 758 const char kSitePerProcess[] = "site-per-process"; 759 760 // Skip gpu info collection, blacklist loading, and blacklist auto-update 761 // scheduling at browser startup time. 762 // Therefore, all GPU features are available, and about:gpu page shows empty 763 // content. The switch is intended only for layout tests. 764 // TODO(gab): Get rid of this switch entirely. 765 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading"; 766 767 // Specifies if the browser should start in fullscreen mode, like if the user 768 // had pressed F11 right after startup. 769 const char kStartFullscreen[] = "start-fullscreen"; 770 771 // Specifies if the |StatsCollectionController| needs to be bound in the 772 // renderer. This binding happens on per-frame basis and hence can potentially 773 // be a performance bottleneck. One should only enable it when running a test 774 // that needs to access the provided statistics. 775 const char kStatsCollectionController[] = 776 "enable-stats-collection-bindings"; 777 778 // Upscale defaults to "good". 779 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality"; 780 781 // Scaling quality for capturing tab. Should be one of "fast", "good" or "best". 782 // One flag for upscaling, one for downscaling. 783 // Upscale defaults to "best". 784 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality"; 785 786 // Allows for forcing socket connections to http/https to use fixed ports. 787 const char kTestingFixedHttpPort[] = "testing-fixed-http-port"; 788 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port"; 789 790 // Type of the current test harness ("browser" or "ui"). 791 const char kTestType[] = "test-type"; 792 793 const char kTouchScrollingMode[] = "touch-scrolling-mode"; 794 const char kTouchScrollingModeAsyncTouchmove[] = "async-touchmove"; 795 const char kTouchScrollingModeSyncTouchmove[] = "sync-touchmove"; 796 const char kTouchScrollingModeTouchcancel[] = "touchcancel"; 797 798 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally, 799 // can specify the specific trace categories to include (e.g. 800 // --trace-shutdown=base,net) otherwise, all events are recorded. 801 // --trace-shutdown-file can be used to control where the trace log gets stored 802 // to since there is otherwise no way to access the result. 803 const char kTraceShutdown[] = "trace-shutdown"; 804 805 // If supplied, sets the file which shutdown tracing will be stored into, if 806 // omitted the default will be used "chrometrace.log" in the current directory. 807 // Has no effect unless --trace-shutdown is also supplied. 808 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log 809 const char kTraceShutdownFile[] = "trace-shutdown-file"; 810 811 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can 812 // specify the specific trace categories to include (e.g. 813 // --trace-startup=base,net) otherwise, all events are recorded. Setting this 814 // flag results in the first call to BeginTracing() to receive all trace events 815 // since startup. In Chrome, you may find --trace-startup-file and 816 // --trace-startup-duration to control the auto-saving of the trace (not 817 // supported in the base-only TraceLog component). 818 const char kTraceStartup[] = "trace-startup"; 819 820 // Sets the time in seconds until startup tracing ends. If omitted a default of 821 // 5 seconds is used. Has no effect without --trace-startup, or if 822 // --startup-trace-file=none was supplied. 823 const char kTraceStartupDuration[] = "trace-startup-duration"; 824 825 // If supplied, sets the file which startup tracing will be stored into, if 826 // omitted the default will be used "chrometrace.log" in the current directory. 827 // Has no effect unless --trace-startup is also supplied. 828 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log 829 // As a special case, can be set to 'none' - this disables automatically saving 830 // the result to a file and the first manually recorded trace will then receive 831 // all events since startup. 832 const char kTraceStartupFile[] = "trace-startup-file"; 833 834 835 836 // Prioritizes the UI's command stream in the GPU process 837 extern const char kUIPrioritizeInGpuProcess[] = 838 "ui-prioritize-in-gpu-process"; 839 840 // Overrides the preferred discardable memory implementation. 841 const char kUseDiscardableMemory[] = "use-discardable-memory"; 842 843 // Bypass the media stream infobar by selecting the default device for media 844 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream. 845 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream"; 846 847 // Set when Chromium should use a mobile user agent. 848 const char kUseMobileUserAgent[] = "use-mobile-user-agent"; 849 850 // Use the new surfaces system to handle compositor delegation. 851 const char kUseSurfaces[] = "use-surfaces"; 852 853 // On POSIX only: the contents of this flag are prepended to the utility 854 // process command line. Useful values might be "valgrind" or "xterm -e gdb 855 // --args". 856 const char kUtilityCmdPrefix[] = "utility-cmd-prefix"; 857 858 // Causes the process to run as a utility subprocess. 859 const char kUtilityProcess[] = "utility"; 860 861 // The utility process is sandboxed, with access to one directory. This flag 862 // specifies the directory that can be accessed. 863 const char kUtilityProcessAllowedDir[] = "utility-allowed-dir"; 864 865 // Allows MDns to access network in sandboxed process. 866 const char kUtilityProcessEnableMDns[] = "utility-enable-mdns"; 867 868 const char kUtilityProcessRunningElevated[] = "utility-run-elevated"; 869 870 // In debug builds, asserts that the stream of input events is valid. 871 const char kValidateInputEventStream[] = "validate-input-event-stream"; 872 873 // Will add kWaitForDebugger to every child processes. If a value is passed, it 874 // will be used as a filter to determine if the child process should have the 875 // kWaitForDebugger flag passed on or not. 876 const char kWaitForDebuggerChildren[] = "wait-for-debugger-children"; 877 878 // Causes the process to run as a worker subprocess. 879 const char kWorkerProcess[] = "worker"; 880 881 // The prefix used when starting the zygote process. (i.e. 'gdb --args') 882 const char kZygoteCmdPrefix[] = "zygote-cmd-prefix"; 883 884 // Causes the process to run as a renderer zygote. 885 const char kZygoteProcess[] = "zygote"; 886 887 #if defined(ENABLE_WEBRTC) 888 // Disables audio processing in a MediaStreamTrack. When this flag is on, AEC, 889 // NS and AGC will be done in PeerConnection instead of MediaStreamTrack. 890 const char kDisableAudioTrackProcessing[] = "disable-audio-track-processing"; 891 892 // Disables WebRTC device enumeration. 893 const char kDisableDeviceEnumeration[] = "disable-device-enumeration"; 894 895 // Disables HW decode acceleration for WebRTC. 896 const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding"; 897 898 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it 899 // ignores this switch on its stable and beta channels. 900 const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption"; 901 902 // Disables HW encode acceleration for WebRTC. 903 const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding"; 904 905 // Enables VP8 HW encode acceleration for WebRTC. 906 const char kEnableWebRtcHWVp8Encoding[] = "enable-webrtc-hw-vp8-encoding"; 907 #endif 908 909 #if defined(OS_ANDROID) 910 // Disable user gesture requirement for media playback. 911 const char kDisableGestureRequirementForMediaPlayback[] = 912 "disable-gesture-requirement-for-media-playback"; 913 914 // Disable the click delay by sending click events during double tap. 915 const char kDisableClickDelay[] = "disable-click-delay"; 916 917 // Disable overscroll edge effects like those found in Android views. 918 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect"; 919 920 // WebRTC is enabled by default on Android. 921 const char kDisableWebRTC[] = "disable-webrtc"; 922 923 // Enable the PowerSaveBlocker in ContentVideoView. Android only. 924 const char kEnableContentVideoViewPowerSaveBlocker[] = 925 "enable-content-video-view-power-save-blocker"; 926 927 // Enable the recognition part of the Web Speech API. 928 const char kEnableSpeechRecognition[] = "enable-speech-recognition"; 929 930 // Always use the video overlay for the embedded video. 931 // This switch is intended only for tests. 932 const char kForceUseOverlayEmbeddedVideo[] = "force-use-overlay-embedded-video"; 933 934 // The telephony region (ISO country code) to use in phone number detection. 935 const char kNetworkCountryIso[] = "network-country-iso"; 936 937 // Enables remote debug over HTTP on the specified socket name. 938 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name"; 939 #endif 940 941 // Disable web audio API. 942 const char kDisableWebAudio[] = "disable-webaudio"; 943 944 #if defined(OS_CHROMEOS) 945 // Disables panel fitting (used for mirror mode). 946 const char kDisablePanelFitting[] = "disable-panel-fitting"; 947 #endif 948 949 #if defined(OS_MACOSX) && !defined(OS_IOS) 950 const char kEnableCarbonInterposing[] = "enable-carbon-interposing"; 951 952 // Disables support for Core Animation plugins. This is triggered when 953 // accelerated compositing is disabled. See http://crbug.com/122430 . 954 const char kDisableCoreAnimationPlugins[] = 955 "disable-core-animation-plugins"; 956 #endif 957 958 #if defined(OS_WIN) 959 // Device scale factor passed to certain processes like renderers, etc. 960 const char kDeviceScaleFactor[] = "device-scale-factor"; 961 962 // Disables the DirectWrite font rendering system on windows. 963 const char kDisableDirectWrite[] = "disable-direct-write"; 964 965 // Disable the Legacy Window which corresponds to the size of the WebContents. 966 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window"; 967 968 // Use high resolution timers for TimeTicks. 969 const char kEnableHighResolutionTime[] = "enable-high-resolution-time"; 970 971 // Enable the Win32K process mitigation policy for renderer processes which 972 // prevents them from invoking user32 and gdi32 system calls which enter 973 // the kernel. This is only supported on Windows 8 and beyond. 974 const char kEnableWin32kRendererLockDown[] 975 = "enable_win32k_renderer_lockdown"; 976 #endif 977 978 // Don't dump stuff here, follow the same order as the header. 979 980 } // namespace switches 981