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