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