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