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