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