handoff: Fix the origin so that it correctly reflects the sender.
[chromium-blink-merge.git] / content / public / common / content_switches.cc
blob18b8884dc44c0f37e247f7c4c528d23b40fb5565
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.
5 #include "content/public/common/content_switches.h"
7 namespace switches {
9 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
10 // have an effect. 0 disables MSAA.
11 const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count";
13 // By default, file:// URIs cannot read other file:// URIs. This is an
14 // override for developers who need the old behavior for testing.
15 const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
17 // Allows frames with an https origin to use WebSockets with an insecure URL
18 // (ws://).
19 const char kAllowInsecureWebSocketFromHttpsOrigin[] =
20 "allow-insecure-websocket-from-https-origin";
22 // Allows loopback interface to be added in network list for peer connection.
23 const char kAllowLoopbackInPeerConnection[] =
24 "allow-loopback-in-peer-connection";
26 // Enables the sandboxed processes to run without a job object assigned to them.
27 // This flag is required to allow Chrome to run in RemoteApps or Citrix. This
28 // flag can reduce the security of the sandboxed processes and allow them to do
29 // certain API calls like shut down Windows or access the clipboard. Also we
30 // lose the chance to kill some processes until the outer job that owns them
31 // finishes.
32 const char kAllowNoSandboxJob[] = "allow-no-sandbox-job";
34 // Allows debugging of sandboxed processes (see zygote_main_linux.cc).
35 const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
37 // The same as kAuditHandles except all handles are enumerated.
38 const char kAuditAllHandles[] = "enable-handle-auditing-all";
40 // Enumerates and prints a child process' most dangerous handles when it
41 // is terminated.
42 const char kAuditHandles[] = "enable-handle-auditing";
44 // Choose which logging channels in blink platform to activate. See
45 // Logging.cpp in blink's Source/platform for a list of available channels.
46 const char kBlinkPlatformLogChannels[] = "blink-platform-log-channels";
48 // Block cross-site documents (i.e., HTML/XML/JSON) from being loaded in
49 // subresources when a document is not supposed to read them. This will later
50 // allow us to block them from the entire renderer process when site isolation
51 // is enabled.
52 const char kBlockCrossSiteDocuments[] = "block-cross-site-documents";
54 // Causes the browser process to crash on startup.
55 const char kBrowserCrashTest[] = "crash-test";
57 // Path to the exe to run for the renderer and plugin subprocesses.
58 const char kBrowserSubprocessPath[] = "browser-subprocess-path";
60 // Dumps extra logging about plugin loading to the log file.
61 const char kDebugPluginLoading[] = "debug-plugin-loading";
63 // Sets the tile size used by composited layers.
64 const char kDefaultTileWidth[] = "default-tile-width";
65 const char kDefaultTileHeight[] = "default-tile-height";
67 // Disable antialiasing on 2d canvas.
68 const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa";
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.
74 const char kDisable3DAPIs[] = "disable-3d-apis";
76 // Disable gpu-accelerated 2d canvas.
77 const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
79 // Disables hardware acceleration of video decode, where available.
80 const char kDisableAcceleratedVideoDecode[] =
81 "disable-accelerated-video-decode";
83 // Disable limits on the number of backing stores. Can prevent blinking for
84 // users with many windows/tabs and lots of memory.
85 const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
87 // Disable one or more Blink runtime-enabled features.
88 // Use names from RuntimeEnabledFeatures.in, separated by commas.
89 // Applied after kEnableBlinkFeatures, and after other flags that change these
90 // features.
91 const char kDisableBlinkFeatures[] = "disable-blink-features";
93 // Disable the Blink Scheduler. Ensures there's no reordering of blink tasks.
94 // This switch is intended only for performance tests.
95 const char kDisableBlinkScheduler[] = "disable-blink-scheduler";
97 // Disable the creation of compositing layers when it would prevent LCD text.
98 const char kDisablePreferCompositingToLCDText[] =
99 "disable-prefer-compositing-to-lcd-text";
101 // Disables HTML5 DB support.
102 const char kDisableDatabases[] = "disable-databases";
104 // Disables delegated renderer.
105 const char kDisableDelegatedRenderer[] = "disable-delegated-renderer";
107 // Handles URL requests by NPAPI plugins through the renderer.
108 const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests";
110 // Disable the per-domain blocking for 3D APIs after GPU reset.
111 // This switch is intended only for tests.
112 extern const char kDisableDomainBlockingFor3DAPIs[] =
113 "disable-domain-blocking-for-3d-apis";
115 // Disable experimental WebGL support.
116 const char kDisableExperimentalWebGL[] = "disable-webgl";
118 // Disable FileSystem API.
119 const char kDisableFileSystem[] = "disable-file-system";
121 // Disable 3D inside of flapper.
122 const char kDisableFlash3d[] = "disable-flash-3d";
124 // Disable Stage3D inside of flapper.
125 const char kDisableFlashStage3d[] = "disable-flash-stage3d";
127 // Disables GPU hardware acceleration. If software renderer is not in place,
128 // then the GPU process won't launch.
129 const char kDisableGpu[] = "disable-gpu";
131 // Prevent the compositor from using its GPU implementation.
132 const char kDisableGpuCompositing[] = "disable-gpu-compositing";
134 // Disable the limit on the number of times the GPU process may be restarted
135 // This switch is intended only for tests.
136 extern const char kDisableGpuProcessCrashLimit[] =
137 "disable-gpu-process-crash-limit";
139 // Disable GPU rasterization, i.e. rasterize on the CPU only.
140 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
141 const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
143 // When using CPU rasterizing disable low resolution tiling. This uses
144 // less power, particularly during animations, but more white may be seen
145 // during fast scrolling especially on slower devices.
146 const char kDisableLowResTiling[] = "disable-low-res-tiling";
148 // Disable the GPU process sandbox.
149 const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
151 // Disable the thread that crashes the GPU process if it stops responding to
152 // messages.
153 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
155 // Suppresses hang monitor dialogs in renderer processes. This may allow slow
156 // unload handlers on a page to prevent the tab from closing, but the Task
157 // Manager can be used to terminate the offending process in this case.
158 const char kDisableHangMonitor[] = "disable-hang-monitor";
160 // Disable hiding the close buttons of inactive tabs when the tabstrip is in
161 // stacked mode.
162 const char kDisableHideInactiveStackedTabCloseButtons[] =
163 "disable-hide-inactive-stacked-tab-close-buttons";
165 // Disable the RenderThread's HistogramCustomizer.
166 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer";
168 // Paint content on the main thread instead of the compositor thread.
169 const char kDisableImplSidePainting[] = "disable-impl-side-painting";
171 // Prevent Java from running.
172 const char kDisableJava[] = "disable-java";
174 // Don't kill a child process when it sends a bad IPC message. Apart
175 // from testing, it is a bad idea from a security perspective to enable
176 // this switch.
177 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc";
179 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
180 const char kDisablePrefixedEncryptedMedia[] =
181 "disable-prefixed-encrypted-media";
183 // Disables LCD text.
184 const char kDisableLCDText[] = "disable-lcd-text";
186 // Disables distance field text.
187 const char kDisableDistanceFieldText[] = "disable-distance-field-text";
189 // Disable LocalStorage.
190 const char kDisableLocalStorage[] = "disable-local-storage";
192 // Force logging to be disabled. Logging is enabled by default in debug
193 // builds.
194 const char kDisableLogging[] = "disable-logging";
196 // Disables Media Source API (i.e., the MediaSource object).
197 const char kDisableMediaSource[] = "disable-media-source";
199 // Disables usage of the namespace sandbox.
200 const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox";
202 // Disables the Web Notification and the Push APIs.
203 const char kDisableNotifications[] = "disable-notifications";
205 // Disable rasterizer that writes directly to GPU memory.
206 // Overrides the kEnableOneCopy flag.
207 const char kDisableOneCopy[] = "disable-one-copy";
209 // Disable Pepper3D.
210 const char kDisablePepper3d[] = "disable-pepper-3d";
212 // Disables compositor-accelerated touch-screen pinch gestures.
213 const char kDisablePinch[] = "disable-pinch";
215 // Disable discovering third-party plugins. Effectively loading only
216 // ones shipped with the browser plus third-party ones as specified by
217 // --extra-plugin-dir and --load-plugin switches.
218 const char kDisablePluginsDiscovery[] = "disable-plugins-discovery";
220 // Taints all <canvas> elements, regardless of origin.
221 const char kDisableReadingFromCanvas[] = "disable-reading-from-canvas";
223 // Disables remote web font support. SVG font should always work whether this
224 // option is specified or not.
225 const char kDisableRemoteFonts[] = "disable-remote-fonts";
227 // Turns off the accessibility in the renderer.
228 const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
230 // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
231 const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox";
233 // Disable the setuid sandbox (Linux only).
234 const char kDisableSetuidSandbox[] = "disable-setuid-sandbox";
236 // Disable shared workers.
237 const char kDisableSharedWorkers[] = "disable-shared-workers";
239 // For tests, disable single thread scheduler and only manually composite.
240 const char kDisableSingleThreadProxyScheduler[] =
241 "disable-single-thread-proxy-scheduler";
243 // Disable smooth scrolling for testing.
244 const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
246 // Disables the use of a 3D software rasterizer.
247 const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
249 // Disables SVG 1.1 DOM.
250 const char kDisableSVG1DOM[] = "disable-svg1dom";
252 // Disable text blob rendering.
253 const char kDisableTextBlobs[] = "disable-text-blobs";
255 // Disable multithreaded GPU compositing of web content.
256 const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
258 // Disable multithreaded, compositor scrolling of web content.
259 const char kDisableThreadedScrolling[] = "disable-threaded-scrolling";
261 // Disable V8 idle tasks.
262 const char kDisableV8IdleTasks[] = "disable-v8-idle-tasks";
264 // Don't enforce the same-origin policy. (Used by people testing their sites.)
265 const char kDisableWebSecurity[] = "disable-web-security";
267 // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
268 const char kDisableXSSAuditor[] = "disable-xss-auditor";
270 // Specifies if the |DOMAutomationController| needs to be bound in the
271 // renderer. This binding happens on per-frame basis and hence can potentially
272 // be a performance bottleneck. One should only enable it when automating dom
273 // based tests.
274 const char kDomAutomationController[] = "dom-automation";
276 // Enable antialiasing on 2d canvas clips (as opposed to draw operations)
277 const char kEnable2dCanvasClipAntialiasing[] = "enable-2d-canvas-clip-aa";
279 // Disable partially decoding jpeg images using the GPU.
280 // At least YUV decoding will be accelerated when not using this flag.
281 // Has no effect unless GPU rasterization is enabled.
282 const char kDisableAcceleratedJpegDecoding[] =
283 "disable-accelerated-jpeg-decoding";
285 // Enable bleeding-edge code to make Chrome draw content faster. The changes
286 // behind this path are very likely to break lots of content.
287 // ** DO NOT use this flag unless you know what you are doing. **
288 const char kEnableBleedingEdgeRenderingFastPaths[] =
289 "enable-bleeding-edge-rendering-fast-paths";
291 // Enables LCD text.
292 const char kEnableLCDText[] = "enable-lcd-text";
294 // Enables using signed distance fields when rendering text.
295 // Only valid if GPU rasterization is enabled as well.
296 const char kEnableDistanceFieldText[] = "enable-distance-field-text";
298 // Enable the experimental Credential Manager JavaScript API.
299 const char kEnableCredentialManagerAPI[] = "enable-credential-manager-api";
301 // Use a BeginFrame signal from browser to renderer to schedule rendering.
302 const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling";
304 // Enable the creation of compositing layers when it would prevent LCD text.
305 const char kEnablePreferCompositingToLCDText[] =
306 "enable-prefer-compositing-to-lcd-text";
308 // Disable one or more Blink runtime-enabled features.
309 // Use names from RuntimeEnabledFeatures.in, separated by commas.
310 // Applied before kDisableBlinkFeatures, and after other flags that change these
311 // features.
312 const char kEnableBlinkFeatures[] = "enable-blink-features";
314 // PlzNavigate: Use the experimental browser-side navigation path.
315 const char kEnableBrowserSideNavigation[] = "enable-browser-side-navigation";
317 // Defer image decoding in WebKit until painting.
318 const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
320 // Enables Delay Agnostic AEC in WebRTC.
321 const char kEnableDelayAgnosticAec[] = "enable-delay-agnostic-aec";
323 // Enables delegated renderer.
324 const char kEnableDelegatedRenderer[] = "enable-delegated-renderer";
326 // Enables display list based 2d canvas implementation. Options:
327 // 1. Enable: allow browser to use display list for 2d canvas (browser makes
328 // decision).
329 // 2. Force: browser always uses display list for 2d canvas.
330 const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
331 const char kForceDisplayList2dCanvas[] = "force-display-list-2d-canvas";
332 const char kDisableDisplayList2dCanvas[] = "disable-display-list-2d-canvas";
334 // Enables restarting interrupted downloads.
335 const char kEnableDownloadResumption[] = "enable-download-resumption";
337 // Disables (unprefixed) Encrypted Media Extensions.
338 const char kDisableEncryptedMedia[] = "disable-encrypted-media";
340 // Enable experimental canvas features, e.g. canvas 2D context attributes
341 const char kEnableExperimentalCanvasFeatures[] =
342 "enable-experimental-canvas-features";
344 // Enables Web Platform features that are in development.
345 const char kEnableExperimentalWebPlatformFeatures[] =
346 "enable-experimental-web-platform-features";
348 // By default, cookies are not allowed on file://. They are needed for testing,
349 // for example page cycler and layout tests. See bug 1157243.
350 const char kEnableFileCookies[] = "enable-file-cookies";
352 // Enables TRACE for GL calls in the renderer.
353 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
355 // Allow heuristics to determine when a layer tile should be drawn with the
356 // Skia GPU backend. Only valid with GPU accelerated compositing +
357 // impl-side painting.
358 const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
360 // When using CPU rasterizing generate low resolution tiling. Low res
361 // tiles may be displayed during fast scrolls especially on slower devices.
362 const char kEnableLowResTiling[] = "enable-low-res-tiling";
364 // Dynamically apply color profiles to web content images.
365 const char kEnableImageColorProfiles[] = "enable-image-color-profiles";
367 // Force logging to be enabled. Logging is disabled by default in release
368 // builds.
369 const char kEnableLogging[] = "enable-logging";
371 // Enables the memory benchmarking extension
372 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking";
374 // Enables the network information API.
375 const char kEnableNetworkInformation[] = "enable-network-information";
377 // Enable rasterizer that writes directly to GPU memory.
378 const char kEnableOneCopy[] = "enable-one-copy";
380 // Enables use of hardware overlay for fullscreen video playback. Android only.
381 const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video";
383 // Enables compositor-accelerated touch-screen pinch gestures.
384 const char kEnablePinch[] = "enable-pinch";
386 // Make the values returned to window.performance.memory more granular and more
387 // up to date in shared worker. Without this flag, the memory information is
388 // still available, but it is bucketized and updated less frequently. This flag
389 // also applys to workers.
390 const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
392 // Enables payloads for received push messages when using the W3C Push API.
393 const char kEnablePushMessagePayload[] = "enable-push-message-payload";
395 // Enable hasPermission() method of the W3C Push API.
396 const char kEnablePushMessagingHasPermission[] =
397 "enable-push-messaging-has-permission";
399 // Set options to cache V8 data. (off, preparse data, or code)
400 const char kV8CacheOptions[] = "v8-cache-options";
402 // Enables the CSS multicol implementation that uses the regions implementation.
403 const char kEnableRegionBasedColumns[] =
404 "enable-region-based-columns";
406 // Cause the OS X sandbox write to syslog every time an access to a resource
407 // is denied by the sandbox.
408 const char kEnableSandboxLogging[] = "enable-sandbox-logging";
410 // Enables seccomp-bpf support for Android. Requires experimental kernel
411 // support. <http://crbug.com/166704>
412 const char kEnableSeccompFilterSandbox[] =
413 "enable-seccomp-filter-sandbox";
415 // Enables the Skia benchmarking extension
416 const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
418 // Enables slimming paint: http://www.chromium.org/blink/slimming-paint
419 const char kEnableSlimmingPaint[] = "enable-slimming-paint";
421 // On platforms that support it, enables smooth scroll animation.
422 const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
424 // Enable spatial navigation
425 const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
427 // Enables StatsTable, logging statistics to a global named shared memory table.
428 const char kEnableStatsTable[] = "enable-stats-table";
430 // Experimentally ensures that each renderer process:
431 // 1) Only handles rendering for pages from a single site, apart from iframes.
432 // (Note that a page can reference content from multiple origins due to images,
433 // JavaScript files, etc. Cross-site iframes are also loaded in-process.)
434 // 2) Only has authority to see or use cookies for the page's top-level origin.
435 // (So if a.com iframes b.com, the b.com network request will be sent without
436 // cookies.)
437 // This is expected to break compatibility with many pages for now. Unlike the
438 // --site-per-process flag, this allows cross-site iframes, but it blocks all
439 // cookies on cross-site requests.
440 const char kEnableStrictSiteIsolation[] = "enable-strict-site-isolation";
442 // Blocks all insecure requests from secure contexts, and prevents the user
443 // from overriding that decision.
444 const char kEnableStrictMixedContentChecking[] =
445 "enable-strict-mixed-content-checking";
447 // Blocks insecure usage of number of powerful features (geolocation, for
448 // example) that we haven't yet deprecated for the web at large.
449 const char kEnableStrictPowerfulFeatureRestrictions[] =
450 "enable-strict-powerful-feature-restrictions";
452 // Enable support for sync events in ServiceWorkers.
453 const char kEnableServiceWorkerSync[] = "enable-service-worker-sync";
455 // Enable use of experimental TCP sockets API for sending data in the
456 // SYN packet.
457 const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
459 // Enabled threaded compositing for layout tests.
460 const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
462 // Enable tracing during the execution of browser tests.
463 const char kEnableTracing[] = "enable-tracing";
465 // The filename to write the output of the test tracing to.
466 const char kEnableTracingOutput[] = "enable-tracing-output";
468 // Enable screen capturing support for MediaStream API.
469 const char kEnableUserMediaScreenCapturing[] =
470 "enable-usermedia-screen-capturing";
472 // Enables the use of the @viewport CSS rule, which allows
473 // pages to control aspects of their own layout. This also turns on touch-screen
474 // pinch gestures.
475 const char kEnableViewport[] = "enable-viewport";
477 // Enables the viewport meta tag, the de facto way to control layout which works
478 // only on mobile browsers.
479 const char kEnableViewportMeta[] = "enable-viewport-meta";
481 // Resizes of the main frame are the caused by changing between landscape
482 // and portrait mode (i.e. Android) so the page should be rescaled to fit
483 const char kMainFrameResizesAreOrientationChanges[] =
484 "main-frame-resizes-are-orientation-changes";
486 // Enable the Vtune profiler support.
487 const char kEnableVtune[] = "enable-vtune-support";
489 // Enables WebGL extensions not yet approved by the community.
490 const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
492 // Enables WebGL rendering into a scanout buffer for overlay support.
493 const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
495 // Enable rasterizer that writes directly to GPU memory associated with tiles.
496 const char kEnableZeroCopy[] = "enable-zero-copy";
498 // Load NPAPI plugins from the specified directory.
499 const char kExtraPluginDir[] = "extra-plugin-dir";
501 // This option can be used to force field trials when testing changes locally.
502 // The argument is a list of name and value pairs, separated by slashes. If a
503 // trial name is prefixed with an asterisk, that trial will start activated.
504 // For example, the following argument defines two trials, with the second one
505 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/"
506 // This option is also used by the browser to send the list of trials to
507 // renderers, using the same format. See
508 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
509 const char kForceFieldTrials[] = "force-fieldtrials";
511 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
512 // accelerated compositing + impl-side painting. Overrides the
513 // kEnableGpuRasterization flag.
514 const char kForceGpuRasterization[] = "force-gpu-rasterization";
516 // The number of multisample antialiasing samples for GPU rasterization.
517 // Requires MSAA support on GPU to have an effect. 0 disables MSAA.
518 const char kGpuRasterizationMSAASampleCount[] =
519 "gpu-rasterization-msaa-sample-count";
521 // Enable threaded GPU rasterization.
522 const char kEnableThreadedGpuRasterization[] =
523 "enable-threaded-gpu-rasterization";
525 // Disable threaded GPU rasterization. Overrides enable.
526 const char kDisableThreadedGpuRasterization[] =
527 "disable-threaded-gpu-rasterization";
529 // Force renderer accessibility to be on instead of enabling it on demand when
530 // a screen reader is detected. The disable-renderer-accessibility switch
531 // overrides this if present.
532 const char kForceRendererAccessibility[] = "force-renderer-accessibility";
534 // Always use text blob rendering, overriding kDisableTextBlobs and any
535 // heuristics that may otherwise disable it.
536 // TODO(fmalita): remove after --disable-impl-side-painting is phased out.
537 const char kForceTextBlobs[] = "force-text-blobs";
539 // Passes gpu device_id from browser process to GPU process.
540 const char kGpuDeviceID[] = "gpu-device-id";
542 // Passes gpu driver_vendor from browser process to GPU process.
543 const char kGpuDriverVendor[] = "gpu-driver-vendor";
545 // Passes gpu driver_version from browser process to GPU process.
546 const char kGpuDriverVersion[] = "gpu-driver-version";
548 // Extra command line options for launching the GPU process (normally used
549 // for debugging). Use like renderer-cmd-prefix.
550 const char kGpuLauncher[] = "gpu-launcher";
552 // Makes this process a GPU sub-process.
553 const char kGpuProcess[] = "gpu-process";
555 // Allows shmat() system call in the GPU sandbox.
556 const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
558 // Makes GPU sandbox failures fatal.
559 const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
561 // Starts the GPU sandbox before creating a GL context.
562 const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
564 // Causes the GPU process to display a dialog on launch.
565 const char kGpuStartupDialog[] = "gpu-startup-dialog";
567 // Passes gpu vendor_id from browser process to GPU process.
568 const char kGpuVendorID[] = "gpu-vendor-id";
570 // These mappings only apply to the host resolver.
571 const char kHostResolverRules[] = "host-resolver-rules";
573 // Ignores certificate-related errors.
574 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
576 // Ignores GPU blacklist.
577 const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
579 // Run the GPU process as a thread in the browser process.
580 const char kInProcessGPU[] = "in-process-gpu";
582 // Overrides the timeout, in seconds, that a child process waits for a
583 // connection from the browser before killing itself.
584 const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
586 // Specifies the flags passed to JS engine
587 const char kJavaScriptFlags[] = "js-flags";
589 // Load an NPAPI plugin from the specified path.
590 const char kLoadPlugin[] = "load-plugin";
592 // Logs GPU control list decisions when enforcing blacklist rules.
593 const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
595 // Sets the minimum log level. Valid values are from 0 to 3:
596 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
597 const char kLoggingLevel[] = "log-level";
599 // Enables saving net log events to a file and sets the file name to use.
600 const char kLogNetLog[] = "log-net-log";
602 // Make plugin processes log their sent and received messages to VLOG(1).
603 const char kLogPluginMessages[] = "log-plugin-messages";
605 // Sets the width and height above which a composited layer will get tiled.
606 const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
607 const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
609 // Sample memory usage with high frequency and store the results to the
610 // Renderer.Memory histogram. Used in memory tests.
611 const char kMemoryMetrics[] = "memory-metrics";
613 // Mutes audio sent to the audio device so it is not audible during
614 // automated testing.
615 const char kMuteAudio[] = "mute-audio";
617 // Don't send HTTP-Referer headers.
618 const char kNoReferrers[] = "no-referrers";
620 // Disables the sandbox for all process types that are normally sandboxed.
621 const char kNoSandbox[] = "no-sandbox";
623 // Number of worker threads used to rasterize content.
624 const char kNumRasterThreads[] = "num-raster-threads";
626 // Controls the behavior of history navigation in response to horizontal
627 // overscroll.
628 // Set the value to '0' to disable.
629 // Set the value to '1' to enable the behavior where pages slide in and out in
630 // response to the horizontal overscroll gesture and a screenshot of the target
631 // page is shown.
632 // Set the value to '2' to enable the simplified overscroll UI where a
633 // navigation arrow slides in from the side of the screen in response to the
634 // horizontal overscroll gesture.
635 // Defaults to '1'.
636 const char kOverscrollHistoryNavigation[] =
637 "overscroll-history-navigation";
639 // Specifies a command that should be used to launch the plugin process. Useful
640 // for running the plugin process through purify or quantify. Ex:
641 // --plugin-launcher="path\to\purify /Run=yes"
642 const char kPluginLauncher[] = "plugin-launcher";
644 // Tells the plugin process the path of the plugin to load
645 const char kPluginPath[] = "plugin-path";
647 // Causes the process to run as a plugin subprocess.
648 const char kPluginProcess[] = "plugin";
650 // Causes the plugin process to display a dialog on launch.
651 const char kPluginStartupDialog[] = "plugin-startup-dialog";
653 // Argument to the process type that indicates a PPAPI broker process type.
654 const char kPpapiBrokerProcess[] = "ppapi-broker";
656 // "Command-line" arguments for the PPAPI Flash; used for debugging options.
657 const char kPpapiFlashArgs[] = "ppapi-flash-args";
659 // Runs PPAPI (Pepper) plugins in-process.
660 const char kPpapiInProcess[] = "ppapi-in-process";
662 // Like kPluginLauncher for PPAPI plugins.
663 const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
665 // Argument to the process type that indicates a PPAPI plugin process type.
666 const char kPpapiPluginProcess[] = "ppapi";
668 // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
669 // --no-sandbox as well or the sandbox won't allow the dialog to display.
670 const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
672 // Runs a single process for each site (i.e., group of pages from the same
673 // registered domain) the user visits. We default to using a renderer process
674 // for each site instance (i.e., group of pages from the same registered
675 // domain with script connections to each other).
676 const char kProcessPerSite[] = "process-per-site";
678 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
679 // renderer process. We default to using a renderer process for each
680 // site instance (i.e., group of pages from the same registered domain with
681 // script connections to each other).
682 const char kProcessPerTab[] = "process-per-tab";
684 // The value of this switch determines whether the process is started as a
685 // renderer or plugin host. If it's empty, it's the browser.
686 const char kProcessType[] = "type";
688 // Enables more web features over insecure connections. Designed to be used
689 // for testing purposes only.
690 const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
692 // Register Pepper plugins (see pepper_plugin_list.cc for its format).
693 const char kRegisterPepperPlugins[] = "register-pepper-plugins";
695 // Enables remote debug over HTTP on the specified port.
696 const char kRemoteDebuggingPort[] = "remote-debugging-port";
698 // The contents of this flag are prepended to the renderer command line.
699 // Useful values might be "valgrind" or "xterm -e gdb --args".
700 const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
702 // Causes the process to run as renderer instead of as browser.
703 const char kRendererProcess[] = "renderer";
705 // Overrides the default/calculated limit to the number of renderer processes.
706 // Very high values for this setting can lead to high memory/resource usage
707 // or instability.
708 const char kRendererProcessLimit[] = "renderer-process-limit";
710 // Causes the renderer process to display a dialog on launch.
711 const char kRendererStartupDialog[] = "renderer-startup-dialog";
713 // Reduce the default `referer` header's granularity.
714 const char kReducedReferrerGranularity[] =
715 "reduced-referrer-granularity";
717 // Handles frame scrolls via the root RenderLayer instead of the FrameView.
718 const char kRootLayerScrolls[] = "root-layer-scrolls";
720 // Causes the process to run as a sandbox IPC subprocess.
721 const char kSandboxIPCProcess[] = "sandbox-ipc";
723 // Enables or disables scroll end effect in response to vertical overscroll.
724 // Set the value to '1' to enable the feature, and set to '0' to disable.
725 // Defaults to disabled.
726 const char kScrollEndEffect[] = "scroll-end-effect";
728 // Visibly render a border around paint rects in the web page to help debug
729 // and study painting behavior.
730 const char kShowPaintRects[] = "show-paint-rects";
732 // Runs the renderer and plugins in the same process as the browser
733 const char kSingleProcess[] = "single-process";
735 // Experimentally enforces a one-site-per-process security policy.
736 // All cross-site navigations force process swaps, and we can restrict a
737 // renderer process's access rights based on its site. For details, see:
738 // http://www.chromium.org/developers/design-documents/site-isolation
740 // Unlike --enable-strict-site-isolation (which allows cross-site iframes),
741 // this flag does not affect which cookies are attached to cross-site requests.
742 // Support is being added to render cross-site iframes in a different process
743 // than their parent pages.
744 const char kSitePerProcess[] = "site-per-process";
746 // Skip gpu info collection, blacklist loading, and blacklist auto-update
747 // scheduling at browser startup time.
748 // Therefore, all GPU features are available, and about:gpu page shows empty
749 // content. The switch is intended only for layout tests.
750 // TODO(gab): Get rid of this switch entirely.
751 const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
753 // Specifies if the browser should start in fullscreen mode, like if the user
754 // had pressed F11 right after startup.
755 const char kStartFullscreen[] = "start-fullscreen";
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.
761 const char kStatsCollectionController[] =
762 "enable-stats-collection-bindings";
764 // Upscale defaults to "good".
765 const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
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".
770 const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
772 // Allows for forcing socket connections to http/https to use fixed ports.
773 const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
774 const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
776 // Type of the current test harness ("browser" or "ui").
777 const char kTestType[] = "test-type";
779 // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally,
780 // can specify the specific trace categories to include (e.g.
781 // --trace-shutdown=base,net) otherwise, all events are recorded.
782 // --trace-shutdown-file can be used to control where the trace log gets stored
783 // to since there is otherwise no way to access the result.
784 const char kTraceShutdown[] = "trace-shutdown";
786 // If supplied, sets the file which shutdown tracing will be stored into, if
787 // omitted the default will be used "chrometrace.log" in the current directory.
788 // Has no effect unless --trace-shutdown is also supplied.
789 // Example: --trace-shutdown --trace-shutdown-file=/tmp/trace_event.log
790 const char kTraceShutdownFile[] = "trace-shutdown-file";
792 // Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
793 // specify the specific trace categories to include (e.g.
794 // --trace-startup=base,net) otherwise, all events are recorded. Setting this
795 // flag results in the first call to BeginTracing() to receive all trace events
796 // since startup. In Chrome, you may find --trace-startup-file and
797 // --trace-startup-duration to control the auto-saving of the trace (not
798 // supported in the base-only TraceLog component).
799 const char kTraceStartup[] = "trace-startup";
801 // Sets the time in seconds until startup tracing ends. If omitted a default of
802 // 5 seconds is used. Has no effect without --trace-startup, or if
803 // --startup-trace-file=none was supplied.
804 const char kTraceStartupDuration[] = "trace-startup-duration";
806 // If supplied, sets the file which startup tracing will be stored into, if
807 // omitted the default will be used "chrometrace.log" in the current directory.
808 // Has no effect unless --trace-startup is also supplied.
809 // Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
810 // As a special case, can be set to 'none' - this disables automatically saving
811 // the result to a file and the first manually recorded trace will then receive
812 // all events since startup.
813 const char kTraceStartupFile[] = "trace-startup-file";
815 // Sets the target URL for uploading tracing data.
816 const char kTraceUploadURL[] = "trace-upload-url";
819 // Prioritizes the UI's command stream in the GPU process
820 extern const char kUIPrioritizeInGpuProcess[] =
821 "ui-prioritize-in-gpu-process";
823 // Bypass the media stream infobar by selecting the default device for media
824 // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
825 const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
827 // Enable native GPU memory buffer support when available.
828 const char kEnableNativeGpuMemoryBuffers[] = "enable-native-gpu-memory-buffers";
830 // Overrides the default texture target used with CHROMIUM_image extension.
831 const char kUseImageTextureTarget[] = "use-image-texture-target";
833 // Set when Chromium should use a mobile user agent.
834 const char kUseMobileUserAgent[] = "use-mobile-user-agent";
836 // Use normal priority for tile task worker threads. Otherwise they may
837 // be run at background priority on some platforms.
838 const char kUseNormalPriorityForTileTaskWorkerThreads[] =
839 "use-normal-priority-for-tile-task-worker-threads";
841 // Use the new surfaces system to handle compositor delegation.
842 const char kUseSurfaces[] = "use-surfaces";
844 // Disable the use of the new surfaces system to handle compositor delegation.
845 const char kDisableSurfaces[] = "disable-surfaces";
847 // The contents of this flag are prepended to the utility process command line.
848 // Useful values might be "valgrind" or "xterm -e gdb --args".
849 const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
851 // Causes the process to run as a utility subprocess.
852 const char kUtilityProcess[] = "utility";
854 // The utility process is sandboxed, with access to one directory. This flag
855 // specifies the directory that can be accessed.
856 const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
858 // Allows MDns to access network in sandboxed process.
859 const char kUtilityProcessEnableMDns[] = "utility-enable-mdns";
861 const char kUtilityProcessRunningElevated[] = "utility-run-elevated";
863 // In debug builds, asserts that the stream of input events is valid.
864 const char kValidateInputEventStream[] = "validate-input-event-stream";
866 // Will add kWaitForDebugger to every child processes. If a value is passed, it
867 // will be used as a filter to determine if the child process should have the
868 // kWaitForDebugger flag passed on or not.
869 const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
871 // The prefix used when starting the zygote process. (i.e. 'gdb --args')
872 const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
874 // Causes the process to run as a renderer zygote.
875 const char kZygoteProcess[] = "zygote";
877 #if defined(ENABLE_WEBRTC)
878 // Disables HW decode acceleration for WebRTC.
879 const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
881 // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
882 // ignores this switch on its stable and beta channels.
883 const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
885 // Disables HW encode acceleration for WebRTC.
886 const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
888 // Enables H264 HW encode acceleration for WebRTC.
889 const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
891 // Enables Origin header in Stun messages for WebRTC.
892 const char kEnableWebRtcStunOrigin[] = "enable-webrtc-stun-origin";
894 // Override the maximum framerate as can be specified in calls to getUserMedia.
895 // This flag expects a value. Example: --max-gum-fps=17.5
896 const char kWebRtcMaxCaptureFramerate[] = "max-gum-fps";
898 #if defined(OS_LINUX) || defined(OS_MACOSX)
899 // Enables Video Capture Device captured data uploaded to Texture for zero-copy
900 // capture pipeline.
901 const char kEnableWebRtcCaptureToTexture[] = "enable-webrtc-capture-to-texture";
902 #endif
903 #endif
905 #if defined(OS_ANDROID)
906 // Disable user gesture requirement for media playback.
907 const char kDisableGestureRequirementForMediaPlayback[] =
908 "disable-gesture-requirement-for-media-playback";
910 // Disable the click delay by sending click events during double tap.
911 const char kDisableClickDelay[] = "disable-click-delay";
913 // Disable overscroll edge effects like those found in Android views.
914 const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
916 // Disable the pull-to-refresh effect when vertically overscrolling content.
917 const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect";
919 // Disable the locking feature of the screen orientation API.
920 const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
922 // WebRTC is enabled by default on Android.
923 const char kDisableWebRTC[] = "disable-webrtc";
925 // The telephony region (ISO country code) to use in phone number detection.
926 const char kNetworkCountryIso[] = "network-country-iso";
928 // Enables remote debug over HTTP on the specified socket name.
929 const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
931 // Block ChildProcessMain thread of the renderer's ChildProcessService until a
932 // Java debugger is attached.
933 const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
934 #endif
936 // Disable web audio API.
937 const char kDisableWebAudio[] = "disable-webaudio";
939 #if defined(OS_CHROMEOS)
940 // Disables panel fitting (used for mirror mode).
941 const char kDisablePanelFitting[] = "disable-panel-fitting";
943 // Disables VA-API accelerated video encode.
944 const char kDisableVaapiAcceleratedVideoEncode[] =
945 "disable-vaapi-accelerated-video-encode";
946 #endif
948 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
949 // Allows sending text-to-speech requests to speech-dispatcher, a common
950 // Linux speech service. Because it's buggy, the user must explicitly
951 // enable it so that visiting a random webpage can't cause instability.
952 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
953 #endif
955 #if defined(OS_MACOSX) && !defined(OS_IOS)
956 // Disables support for Core Animation plugins. This is triggered when
957 // accelerated compositing is disabled. See http://crbug.com/122430.
958 const char kDisableCoreAnimationPlugins[] =
959 "disable-core-animation-plugins";
960 #endif
962 #if defined(OS_WIN)
963 // Device scale factor passed to certain processes like renderers, etc.
964 const char kDeviceScaleFactor[] = "device-scale-factor";
966 // Disable the Legacy Window which corresponds to the size of the WebContents.
967 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
969 // Enables or disables the Win32K process mitigation policy for renderer
970 // processes which prevents them from invoking user32 and gdi32 system calls
971 // which enter the kernel. This is only supported on Windows 8 and beyond.
972 const char kDisableWin32kRendererLockDown[] =
973 "disable-win32k-renderer-lockdown";
974 const char kEnableWin32kRendererLockDown[] =
975 "enable-win32k-renderer-lockdown";
977 // DirectWrite FontCache is shared by browser to renderers using shared memory.
978 // This switch allows specifying suffix to shared memory section name to avoid
979 // clashes between different instances of Chrome.
980 const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix";
981 #endif
983 // Enables the use of NPAPI plugins.
984 const char kEnableNpapi[] = "enable-npapi";
986 #if defined(ENABLE_PLUGINS)
987 // Enables the plugin power saver feature.
988 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver";
989 #endif
991 // Don't dump stuff here, follow the same order as the header.
993 } // namespace switches