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