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