content_switches.cc revision bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3
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 the new chrome://media-internals page.
416// http://crbug.com/260005
417const char kEnableNewMediaInternals[]       = "enable-new-media-internals";
418
419// Enables compositor-accelerated touch-screen pinch gestures.
420const char kEnablePinch[]                   = "enable-pinch";
421const char kDisablePinch[]                  = "disable-pinch";
422
423// Enables use of cache if offline, even if it's stale
424const char kEnableOfflineCacheAccess[]      = "enable-offline-cache-access";
425
426// Enable caching of pre-parsed JS script data.  See http://crbug.com/32407.
427const char kEnablePreparsedJsCaching[]      = "enable-preparsed-js-caching";
428
429// Enable privileged WebGL extensions; without this switch such extensions are
430// available only to Chrome extensions.
431const char kEnablePrivilegedWebGLExtensions[] =
432    "enable-privileged-webgl-extensions";
433
434// Aggressively free GPU command buffers belonging to hidden tabs.
435const char kEnablePruneGpuCommandBuffers[] =
436    "enable-prune-gpu-command-buffers";
437
438// Enable screen capturing support for MediaStream API.
439const char kEnableUserMediaScreenCapturing[] =
440    "enable-usermedia-screen-capturing";
441
442// Enables TLS cached info extension.
443const char kEnableSSLCachedInfo[]  = "enable-ssl-cached-info";
444
445// Cause the OS X sandbox write to syslog every time an access to a resource
446// is denied by the sandbox.
447const char kEnableSandboxLogging[]          = "enable-sandbox-logging";
448
449// Enable spatial navigation
450const char kEnableSpatialNavigation[]       = "enable-spatial-navigation";
451
452// On platforms that support it, enables smooth scroll animation.
453const char kEnableSmoothScrolling[]         = "enable-smooth-scrolling";
454
455// Enables StatsTable, logging statistics to a global named shared memory table.
456const char kEnableStatsTable[]              = "enable-stats-table";
457
458// Experimentally ensures that each renderer process:
459// 1) Only handles rendering for pages from a single site, apart from iframes.
460// (Note that a page can reference content from multiple origins due to images,
461// JavaScript files, etc.  Cross-site iframes are also loaded in-process.)
462// 2) Only has authority to see or use cookies for the page's top-level origin.
463// (So if a.com iframes b.com, the b.com network request will be sent without
464// cookies.)
465// This is expected to break compatibility with many pages for now.  Unlike the
466// --site-per-process flag, this allows cross-site iframes, but it blocks all
467// cookies on cross-site requests.
468const char kEnableStrictSiteIsolation[]     = "enable-strict-site-isolation";
469
470// Enable multithreaded GPU compositing of web content.
471const char kEnableThreadedCompositing[]     = "enable-threaded-compositing";
472
473// Allow GL contexts to be automatically virtualized (shared between command
474// buffer clients) if they are compatible.
475const char kEnableVirtualGLContexts[]       = "enable-virtual-gl-contexts";
476
477// Disable multithreaded GPU compositing of web content.
478const char kDisableThreadedCompositing[]     = "disable-threaded-compositing";
479
480// Enable use of experimental TCP sockets API for sending data in the
481// SYN packet.
482const char kEnableTcpFastOpen[]             = "enable-tcp-fastopen";
483
484// Disables hardware acceleration of video decode, where available.
485const char kDisableAcceleratedVideoDecode[] =
486    "disable-accelerated-video-decode";
487
488// Enables the use of the viewport meta tag, which allows
489// pages to control aspects of their own layout. This also turns on touch-screen
490// pinch gestures.
491const char kEnableViewport[]                = "enable-viewport";
492
493// Enables experimental features for the geolocation API.
494// Current features:
495// - CoreLocation support for Mac OS X 10.6
496// - Gateway location for Linux and Windows
497// - Location platform support for Windows 7
498const char kExperimentalLocationFeatures[]  = "experimental-location-features";
499
500// If accelerated compositing is supported, always enter compositing mode for
501// the base layer even when compositing is not strictly required.
502const char kForceCompositingMode[]          = "force-compositing-mode";
503
504// This flag disables force compositing mode and prevents it from being enabled
505// via field trials.
506const char kDisableForceCompositingMode[]   = "disable-force-compositing-mode";
507
508// Some field trials may be randomized in the browser, and the randomly selected
509// outcome needs to be propagated to the renderer. For instance, this is used
510// to modify histograms recorded in the renderer, or to get the renderer to
511// also set of its state (initialize, or not initialize components) to match the
512// experiment(s). The option is also useful for forcing field trials when
513// testing changes locally. The argument is a list of name and value pairs,
514// separated by slashes. See FieldTrialList::CreateTrialsFromString() in
515// field_trial.h for details.
516const char kForceFieldTrials[]              = "force-fieldtrials";
517
518// Force renderer accessibility to be on instead of enabling it on demand when
519// a screen reader is detected. The disable-renderer-accessibility switch
520// overrides this if present.
521const char kForceRendererAccessibility[]    = "force-renderer-accessibility";
522
523// Force the compositor to use its software implementation instead of GL.
524const char kEnableSoftwareCompositingGLAdapter[] =
525    "enable-software-compositing-gl-adapter";
526
527// Passes gpu device_id from browser process to GPU process.
528const char kGpuDeviceID[]                   = "gpu-device-id";
529
530// Passes gpu driver_vendor from browser process to GPU process.
531const char kGpuDriverVendor[]               = "gpu-driver-vendor";
532
533// Passes gpu driver_version from browser process to GPU process.
534const char kGpuDriverVersion[]              = "gpu-driver-version";
535
536// Extra command line options for launching the GPU process (normally used
537// for debugging). Use like renderer-cmd-prefix.
538const char kGpuLauncher[]                   = "gpu-launcher";
539
540// Makes this process a GPU sub-process.
541const char kGpuProcess[]                    = "gpu-process";
542
543// Causes the GPU process to display a dialog on launch.
544const char kGpuStartupDialog[]              = "gpu-startup-dialog";
545
546// Passes gpu vendor_id from browser process to GPU process.
547const char kGpuVendorID[]                   = "gpu-vendor-id";
548
549#if defined(OS_ANDROID)
550// Don't display any scrollbars. This is useful for Android WebView where
551// the system manages the scrollbars instead.
552const char kHideScrollbars[]                = "hide-scrollbars";
553#endif
554
555// These mappings only apply to the host resolver.
556const char kHostResolverRules[]             = "host-resolver-rules";
557
558// Ignores certificate-related errors.
559const char kIgnoreCertificateErrors[]       = "ignore-certificate-errors";
560
561// Ignores GPU blacklist.
562const char kIgnoreGpuBlacklist[]            = "ignore-gpu-blacklist";
563
564// Run the GPU process as a thread in the browser process.
565const char kInProcessGPU[]                  = "in-process-gpu";
566
567// Runs plugins inside the renderer process
568const char kInProcessPlugins[]              = "in-process-plugins";
569
570// Specifies the flags passed to JS engine
571const char kJavaScriptFlags[]               = "js-flags";
572
573// Load NPAPI plugins from the specified directory.
574const char kExtraPluginDir[]                = "extra-plugin-dir";
575
576// Load an NPAPI plugin from the specified path.
577const char kLoadPlugin[]                    = "load-plugin";
578
579// Disable discovering third-party plug-ins. Effectively loading only
580// ones shipped with the browser plus third-party ones as specified by
581// --extra-plugin-dir and --load-plugin switches.
582const char kDisablePluginsDiscovery[]       = "disable-plugins-discovery";
583
584// Sets the minimum log level. Valid values are from 0 to 3:
585// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
586const char kLoggingLevel[]                  = "log-level";
587
588// Make plugin processes log their sent and received messages to VLOG(1).
589const char kLogPluginMessages[]             = "log-plugin-messages";
590
591// Sample memory usage with high frequency and store the results to the
592// Renderer.Memory histogram. Used in memory tests.
593const char kMemoryMetrics[]                 = "memory-metrics";
594
595// Don't send HTTP-Referer headers.
596const char kNoReferrers[]                   = "no-referrers";
597
598// Disables the sandbox for all process types that are normally sandboxed.
599const char kNoSandbox[]                     = "no-sandbox";
600
601// Enables the sandboxed processes to run without a job object assigned to them.
602// This flag is required to allow Chrome to run in RemoteApps or Citrix. This
603// flag can reduce the security of the sandboxed processes and allow them to do
604// certain API calls like shut down Windows or access the clipboard. Also we
605// lose the chance to kill some processes until the outer job that owns them
606// finishes.
607const char kAllowNoSandboxJob[]             = "allow-no-sandbox-job";
608
609// Specifies a command that should be used to launch the plugin process.  Useful
610// for running the plugin process through purify or quantify.  Ex:
611//   --plugin-launcher="path\to\purify /Run=yes"
612const char kPluginLauncher[]                = "plugin-launcher";
613
614// Tells the plugin process the path of the plugin to load
615const char kPluginPath[]                    = "plugin-path";
616
617// Causes the process to run as a plugin subprocess.
618const char kPluginProcess[]                 = "plugin";
619
620// Causes the plugin process to display a dialog on launch.
621const char kPluginStartupDialog[]           = "plugin-startup-dialog";
622
623// Argument to the process type that indicates a PPAPI broker process type.
624const char kPpapiBrokerProcess[]            = "ppapi-broker";
625
626// Runs PPAPI (Pepper) plugins in-process.
627const char kPpapiInProcess[]                = "ppapi-in-process";
628
629// Like kPluginLauncher for PPAPI plugins.
630const char kPpapiPluginLauncher[]           = "ppapi-plugin-launcher";
631
632// Argument to the process type that indicates a PPAPI plugin process type.
633const char kPpapiPluginProcess[]            = "ppapi";
634
635// Causes the PPAPI sub process to display a dialog on launch. Be sure to use
636// --no-sandbox as well or the sandbox won't allow the dialog to display.
637const char kPpapiStartupDialog[]            = "ppapi-startup-dialog";
638
639// Runs a single process for each site (i.e., group of pages from the same
640// registered domain) the user visits.  We default to using a renderer process
641// for each site instance (i.e., group of pages from the same registered
642// domain with script connections to each other).
643const char kProcessPerSite[]                = "process-per-site";
644
645// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
646// renderer process.  We default to using a renderer process for each
647// site instance (i.e., group of pages from the same registered domain with
648// script connections to each other).
649const char kProcessPerTab[]                 = "process-per-tab";
650
651// The value of this switch determines whether the process is started as a
652// renderer or plugin host.  If it's empty, it's the browser.
653const char kProcessType[]                   = "type";
654
655// Register Pepper plugins (see pepper_plugin_registry.cc for its format).
656const char kRegisterPepperPlugins[]         = "register-pepper-plugins";
657
658// Enables remote debug over HTTP on the specified port.
659const char kRemoteDebuggingPort[]           = "remote-debugging-port";
660
661#if defined(OS_ANDROID)
662// Enables remote debug over HTTP on the specified socket name.
663const char kRemoteDebuggingSocketName[]     = "remote-debugging-socket-name";
664#endif
665
666// Causes the renderer process to throw an assertion on launch.
667const char kRendererAssertTest[]            = "renderer-assert-test";
668
669// On POSIX only: the contents of this flag are prepended to the renderer
670// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
671const char kRendererCmdPrefix[]             = "renderer-cmd-prefix";
672
673// Causes the process to run as renderer instead of as browser.
674const char kRendererProcess[]               = "renderer";
675
676// Enable the Vtune profiler support.
677const char kEnableVtune[]                   = "enable-vtune-support";
678
679// Overrides the default/calculated limit to the number of renderer processes.
680// Very high values for this setting can lead to high memory/resource usage
681// or instability.
682const char kRendererProcessLimit[]          = "renderer-process-limit";
683
684// Causes the renderer process to display a dialog on launch.
685const char kRendererStartupDialog[]         = "renderer-startup-dialog";
686
687// Enables accelerated compositing for overflow scroll. Promotes eligible
688// overflow:scroll elements to layers to enable accelerated scrolling for them.
689const char kEnableAcceleratedOverflowScroll[] =
690    "enable-accelerated-overflow-scroll";
691
692// Disables accelerated compositing for overflow scroll.
693const char kDisableAcceleratedOverflowScroll[] =
694    "disable-accelerated-overflow-scroll";
695
696// Enables accelerated compositing for scrollable frames for accelerated
697// scrolling for them. Requires kForceCompositingMode.
698const char kEnableAcceleratedScrollableFrames[] =
699     "enable-accelerated-scrollable-frames";
700
701// Enables accelerated scrolling by the compositor for frames. Requires
702// kForceCompositingMode and kEnableAcceleratedScrollableFrames.
703const char kEnableCompositedScrollingForFrames[] =
704     "enable-composited-scrolling-for-frames";
705
706// Visibly render a border around paint rects in the web page to help debug
707// and study painting behavior.
708const char kShowPaintRects[]                = "show-paint-rects";
709
710// Map mouse input events into touch gesture events.  Useful for debugging touch
711// gestures without needing a touchscreen.
712const char kSimulateTouchScreenWithMouse[]  =
713    "simulate-touch-screen-with-mouse";
714
715// Runs the renderer and plugins in the same process as the browser
716const char kSingleProcess[]                 = "single-process";
717
718// Experimentally enforces a one-site-per-process security policy.
719// All cross-site navigations force process swaps, and we can restrict a
720// renderer process's access rights based on its site.  For details, see:
721// http://www.chromium.org/developers/design-documents/site-isolation
722//
723// Unlike --enable-strict-site-isolation (which allows cross-site iframes),
724// this flag blocks cross-site documents even in iframes, until out-of-process
725// iframe support is available.  Cross-site network requests do attach the
726// normal set of cookies, but a renderer process is only allowed to view or
727// modify cookies for its own site (via JavaScript).
728// TODO(irobert): Implement the cross-site document blocking in
729// http://crbug.com/159215.
730const char kSitePerProcess[]                = "site-per-process";
731
732// Skip gpu info collection, blacklist loading, and blacklist auto-update
733// scheduling at browser startup time.
734// Therefore, all GPU features are available, and about:gpu page shows empty
735// content. The switch is intended only for tests.
736const char kSkipGpuDataLoading[]            = "skip-gpu-data-loading";
737
738// Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
739// One flag for upscaling, one for downscaling.
740// Upscale defaults to "best".
741const char kTabCaptureUpscaleQuality[]      = "tab-capture-upscale-quality";
742// Upscale defaults to "good".
743const char kTabCaptureDownscaleQuality[]    = "tab-capture-downscale-quality";
744
745// GestureTapDown events are deferred by this many miillseconds before
746// sending them to the renderer.
747const char kTapDownDeferralTimeMs[]         = "tap-down-deferral-time";
748
749// Runs the security test for the renderer sandbox.
750const char kTestSandbox[]                   = "test-sandbox";
751
752// Allows for forcing socket connections to http/https to use fixed ports.
753const char kTestingFixedHttpPort[]          = "testing-fixed-http-port";
754const char kTestingFixedHttpsPort[]         = "testing-fixed-https-port";
755
756// Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
757// specify the specific trace categories to include (e.g.
758// --trace-startup=base,net) otherwise, all events are recorded. Setting this
759// flag results in the first call to BeginTracing() to receive all trace events
760// since startup. In Chrome, you may find --trace-startup-file and
761// --trace-startup-duration to control the auto-saving of the trace (not
762// supported in the base-only TraceLog component).
763const char kTraceStartup[]                  = "trace-startup";
764
765// If supplied, sets the file which startup tracing will be stored into, if
766// omitted the default will be used "chrometrace.log" in the current directory.
767// Has no effect unless --trace-startup is also supplied.
768// Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
769// As a special case, can be set to 'none' - this disables automatically saving
770// the result to a file and the first manually recorded trace will then receive
771// all events since startup.
772const char kTraceStartupFile[]              = "trace-startup-file";
773
774// Sets the time in seconds until startup tracing ends. If omitted a default of
775// 5 seconds is used. Has no effect without --trace-startup, or if
776// --startup-trace-file=none was supplied.
777const char kTraceStartupDuration[]          = "trace-startup-duration";
778
779// Prioritizes the UI's command stream in the GPU process
780extern const char kUIPrioritizeInGpuProcess[] =
781    "ui-prioritize-in-gpu-process";
782
783// A string used to override the default user agent with a custom one.
784const char kUserAgent[]                     = "user-agent";
785
786// On POSIX only: the contents of this flag are prepended to the utility
787// process command line. Useful values might be "valgrind" or "xterm -e gdb
788// --args".
789const char kUtilityCmdPrefix[]              = "utility-cmd-prefix";
790
791// Causes the process to run as a utility subprocess.
792const char kUtilityProcess[]                = "utility";
793
794// The utility process is sandboxed, with access to one directory. This flag
795// specifies the directory that can be accessed.
796const char kUtilityProcessAllowedDir[]      = "utility-allowed-dir";
797
798// Allows MDns to access network in sandboxed process.
799const char kUtilityProcessEnableMDns[]      = "utility-enable-mdns";
800
801// Will add kWaitForDebugger to every child processes. If a value is passed, it
802// will be used as a filter to determine if the child process should have the
803// kWaitForDebugger flag passed on or not.
804const char kWaitForDebuggerChildren[]       = "wait-for-debugger-children";
805
806// Choose which logging channels in WebCore to activate.  See
807// Logging.cpp in WebKit's WebCore for a list of available channels.
808const char kWebCoreLogChannels[]            = "webcore-log-channels";
809
810// Causes the process to run as a worker subprocess.
811const char kWorkerProcess[]                 = "worker";
812
813// The prefix used when starting the zygote process. (i.e. 'gdb --args')
814const char kZygoteCmdPrefix[]               = "zygote-cmd-prefix";
815
816// Causes the process to run as a renderer zygote.
817const char kZygoteProcess[]                 = "zygote";
818
819// Enables moving cursor by word in visual order.
820const char kEnableVisualWordMovement[]      = "enable-visual-word-movement";
821
822// Set when Chromium should use a mobile user agent.
823const char kUseMobileUserAgent[] = "use-mobile-user-agent";
824
825#if defined(OS_ANDROID)
826// Disable history logging for media elements.
827const char kDisableMediaHistoryLogging[]    = "disable-media-history";
828
829// Disable user gesture requirement for media playback.
830const char kDisableGestureRequirementForMediaPlayback[] =
831    "disable-gesture-requirement-for-media-playback";
832
833// The telephony region (ISO country code) to use in phone number detection.
834const char kNetworkCountryIso[] = "network-country-iso";
835
836// Disable overscroll edge effects like those found in Android views.
837const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
838#endif
839
840#if defined(OS_CHROMEOS)
841// Disables panel fitting (used for mirror mode).
842const char kDisablePanelFitting[]           = "disable-panel-fitting";
843#endif
844
845#if defined(OS_POSIX)
846// Causes the child processes to cleanly exit via calling exit().
847const char kChildCleanExit[]                = "child-clean-exit";
848#endif
849
850#if defined(OS_MACOSX) && !defined(OS_IOS)
851const char kDisableCarbonInterposing[]      = "disable-carbon-interposing";
852
853// Use core animation to draw the RenderWidgetHostView on Mac.
854const char kUseCoreAnimation[]              = "use-core-animation";
855#endif
856
857// Disables the use of a 3D software rasterizer.
858const char kDisableSoftwareRasterizer[]     = "disable-software-rasterizer";
859
860#if defined(USE_AURA)
861// Forces usage of the test compositor. Needed to run ui tests on bots.
862extern const char kTestCompositor[]         = "test-compositor";
863#endif
864
865// Sets the tile size used by composited layers.
866const char kDefaultTileWidth[]              = "default-tile-width";
867const char kDefaultTileHeight[]             = "default-tile-height";
868
869// Sets the width and height above which a composited layer will get tiled.
870const char kMaxUntiledLayerWidth[]          = "max-untiled-layer-width";
871const char kMaxUntiledLayerHeight[]         = "max-untiled-layer-height";
872
873// Use ExynosVideoDecodeAccelerator for video decode (instead of SECOMX)
874const char kUseExynosVda[]                  = "use-exynos-vda";
875
876const char kEnableFixedPositionCreatesStackingContext[]
877    = "enable-fixed-position-creates-stacking-context";
878const char kDisableFixedPositionCreatesStackingContext[]
879    = "disable-fixed-position-creates-stacking-context";
880
881// Defer image decoding in WebKit until painting.
882const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
883
884// Use a begin frame signal from browser to renderer to schedule rendering.
885const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling";
886
887// Synchronize delivery and response of input events to and from the renderer.
888const char kEnableBrowserInputController[] = "enable-browser-input-controller";
889
890// Enables or disables history navigation in response to horizontal overscroll.
891// Set the value to '1' to enable the feature, and set to '0' to disable.
892// Defaults to enabled.
893const char kOverscrollHistoryNavigation[] =
894    "overscroll-history-navigation";
895
896// Enables or disables scroll end effect in response to vertical overscroll.
897// Set the value to '1' to enable the feature, and set to '0' to disable.
898// Defaults to disabled.
899const char kScrollEndEffect[] = "scroll-end-effect";
900
901// Forward overscroll event data from the renderer to the browser.
902const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications";
903
904// Enables WebGL extensions not yet approved by the community.
905const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
906
907// Enables/disables accelerated compositing for backgrounds of root layers with
908// background-attachment: fixed. Requires kForceCompositingMode.
909const char kDisableAcceleratedFixedRootBackground[] =
910    "disable-accelerated-fixed-root-background";
911const char kEnableAcceleratedFixedRootBackground[] =
912    "enable-accelerated-fixed-root-background";
913
914}  // namespace switches
915