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