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