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