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