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