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