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