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