PageRenderTime 68ms CodeModel.GetById 33ms RepoModel.GetById 1ms app.codeStats 0ms

/content/public/common/content_switches.cc

https://gitlab.com/jonnialva90/iridium-browser
C++ | 968 lines | 308 code | 255 blank | 405 comment | 2 complexity | d58c7ec2c713dc1a68122214c2046d63 MD5 | raw file
  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. #include "content/public/common/content_switches.h"
  5. namespace switches {
  6. // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
  7. // have an effect. 0 disables MSAA.
  8. const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count";
  9. // By default, file:// URIs cannot read other file:// URIs. This is an
  10. // override for developers who need the old behavior for testing.
  11. const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
  12. // Allows loopback interface to be added in network list for peer connection.
  13. const char kAllowLoopbackInPeerConnection[] =
  14. "allow-loopback-in-peer-connection";
  15. // Enables the sandboxed processes to run without a job object assigned to them.
  16. // This flag is required to allow Chrome to run in RemoteApps or Citrix. This
  17. // flag can reduce the security of the sandboxed processes and allow them to do
  18. // certain API calls like shut down Windows or access the clipboard. Also we
  19. // lose the chance to kill some processes until the outer job that owns them
  20. // finishes.
  21. const char kAllowNoSandboxJob[] = "allow-no-sandbox-job";
  22. // Allows debugging of sandboxed processes (see zygote_main_linux.cc).
  23. const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
  24. // Choose which logging channels in blink platform to activate. See
  25. // Logging.cpp in blink's Source/platform for a list of available channels.
  26. const char kBlinkPlatformLogChannels[] = "blink-platform-log-channels";
  27. // Set blink settings. Format is <name>[=<value],<name>[=<value>],...
  28. // The names are declared in Settings.in. For boolean type, use "true", "false",
  29. // or omit '=<value>' part to set to true. For enum type, use the int value of
  30. // the enum value. Applied after other command line flags and prefs.
  31. const char kBlinkSettings[] = "blink-settings";
  32. // Causes the browser process to crash on startup.
  33. const char kBrowserCrashTest[] = "crash-test";
  34. // Path to the exe to run for the renderer and plugin subprocesses.
  35. const char kBrowserSubprocessPath[] = "browser-subprocess-path";
  36. // Dumps extra logging about plugin loading to the log file.
  37. const char kDebugPluginLoading[] = "debug-plugin-loading";
  38. // Sets the tile size used by composited layers.
  39. const char kDefaultTileWidth[] = "default-tile-width";
  40. const char kDefaultTileHeight[] = "default-tile-height";
  41. // Disable antialiasing on 2d canvas.
  42. const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa";
  43. // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
  44. // This is controlled by policy and is kept separate from the other
  45. // enable/disable switches to avoid accidentally regressing the policy
  46. // support for controlling access to these APIs.
  47. const char kDisable3DAPIs[] = "disable-3d-apis";
  48. // Disable gpu-accelerated 2d canvas.
  49. const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
  50. // Disable hardware acceleration of mjpeg decode for captured frame, where
  51. // available.
  52. const char kDisableAcceleratedMjpegDecode[] =
  53. "disable-accelerated-mjpeg-decode";
  54. // Disables hardware acceleration of video decode, where available.
  55. const char kDisableAcceleratedVideoDecode[] =
  56. "disable-accelerated-video-decode";
  57. // Disable limits on the number of backing stores. Can prevent blinking for
  58. // users with many windows/tabs and lots of memory.
  59. const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
  60. // Disable one or more Blink runtime-enabled features.
  61. // Use names from RuntimeEnabledFeatures.in, separated by commas.
  62. // Applied after kEnableBlinkFeatures, and after other flags that change these
  63. // features.
  64. const char kDisableBlinkFeatures[] = "disable-blink-features";
  65. // Disable the creation of compositing layers when it would prevent LCD text.
  66. const char kDisablePreferCompositingToLCDText[] =
  67. "disable-prefer-compositing-to-lcd-text";
  68. // Disables HTML5 DB support.
  69. const char kDisableDatabases[] = "disable-databases";
  70. // Disables Delay Agnostic AEC in WebRTC.
  71. const char kDisableDelayAgnosticAec[] = "disable-delay-agnostic-aec";
  72. // Handles URL requests by NPAPI plugins through the renderer.
  73. const char kDisableDirectNPAPIRequests[] = "disable-direct-npapi-requests";
  74. // Disable the per-domain blocking for 3D APIs after GPU reset.
  75. // This switch is intended only for tests.
  76. const char kDisableDomainBlockingFor3DAPIs[] =
  77. "disable-domain-blocking-for-3d-apis";
  78. // Disable experimental WebGL support.
  79. const char kDisableExperimentalWebGL[] = "disable-webgl";
  80. // Comma-separated list of feature names to disable. See also kEnableFeatures.
  81. const char kDisableFeatures[] = "disable-features";
  82. // Disable FileSystem API.
  83. const char kDisableFileSystem[] = "disable-file-system";
  84. // Disable 3D inside of flapper.
  85. const char kDisableFlash3d[] = "disable-flash-3d";
  86. // Disable Stage3D inside of flapper.
  87. const char kDisableFlashStage3d[] = "disable-flash-stage3d";
  88. // Disables GPU hardware acceleration. If software renderer is not in place,
  89. // then the GPU process won't launch.
  90. const char kDisableGpu[] = "disable-gpu";
  91. // Prevent the compositor from using its GPU implementation.
  92. const char kDisableGpuCompositing[] = "disable-gpu-compositing";
  93. // Disable proactive early init of GPU process.
  94. const char kDisableGpuEarlyInit[] = "disable-gpu-early-init";
  95. // Disable GpuMemoryBuffer backed VideoFrames.
  96. const char kDisableGpuMemoryBufferVideoFrames[] =
  97. "disable-gpu-memory-buffer-video-frames";
  98. // Disable the limit on the number of times the GPU process may be restarted
  99. // This switch is intended only for tests.
  100. const char kDisableGpuProcessCrashLimit[] = "disable-gpu-process-crash-limit";
  101. // Disable GPU rasterization, i.e. rasterize on the CPU only.
  102. // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags.
  103. const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
  104. // When using CPU rasterizing disable low resolution tiling. This uses
  105. // less power, particularly during animations, but more white may be seen
  106. // during fast scrolling especially on slower devices.
  107. const char kDisableLowResTiling[] = "disable-low-res-tiling";
  108. // Disable the GPU process sandbox.
  109. const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
  110. // Disable the thread that crashes the GPU process if it stops responding to
  111. // messages.
  112. const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
  113. // Suppresses hang monitor dialogs in renderer processes. This may allow slow
  114. // unload handlers on a page to prevent the tab from closing, but the Task
  115. // Manager can be used to terminate the offending process in this case.
  116. const char kDisableHangMonitor[] = "disable-hang-monitor";
  117. // Disable hiding the close buttons of inactive tabs when the tabstrip is in
  118. // stacked mode.
  119. const char kDisableHideInactiveStackedTabCloseButtons[] =
  120. "disable-hide-inactive-stacked-tab-close-buttons";
  121. // Disable the RenderThread's HistogramCustomizer.
  122. const char kDisableHistogramCustomizer[] = "disable-histogram-customizer";
  123. // Don't kill a child process when it sends a bad IPC message. Apart
  124. // from testing, it is a bad idea from a security perspective to enable
  125. // this switch.
  126. const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc";
  127. // Enables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()).
  128. const char kEnablePrefixedEncryptedMedia[] =
  129. "enable-prefixed-encrypted-media";
  130. // Disables LCD text.
  131. const char kDisableLCDText[] = "disable-lcd-text";
  132. // Disables distance field text.
  133. const char kDisableDistanceFieldText[] = "disable-distance-field-text";
  134. // Disable LocalStorage.
  135. const char kDisableLocalStorage[] = "disable-local-storage";
  136. // Force logging to be disabled. Logging is enabled by default in debug
  137. // builds.
  138. const char kDisableLogging[] = "disable-logging";
  139. // Disables Media Source API (i.e., the MediaSource object).
  140. const char kDisableMediaSource[] = "disable-media-source";
  141. // Disables usage of the namespace sandbox.
  142. const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox";
  143. // Disables native GPU memory buffer support.
  144. const char kDisableNativeGpuMemoryBuffers[] =
  145. "disable-native-gpu-memory-buffers";
  146. // Disables the Web Notification and the Push APIs.
  147. const char kDisableNotifications[] = "disable-notifications";
  148. // Disable Pepper3D.
  149. const char kDisablePepper3d[] = "disable-pepper-3d";
  150. // Disables the Permissions API.
  151. const char kDisablePermissionsAPI[] = "disable-permissions-api";
  152. // Disables the use of persistent GPU memory buffers for partial raster.
  153. const char kDisablePersistentGpuMemoryBuffer[] =
  154. "disable-persistent-gpu-memory-buffer";
  155. // Disables compositor-accelerated touch-screen pinch gestures.
  156. const char kDisablePinch[] = "disable-pinch";
  157. // Disable discovering third-party plugins. Effectively loading only
  158. // ones shipped with the browser plus third-party ones as specified by
  159. // --extra-plugin-dir and --load-plugin switches.
  160. const char kDisablePluginsDiscovery[] = "disable-plugins-discovery";
  161. // Disables the Presentation API.
  162. const char kDisablePresentationAPI[] = "disable-presentation-api";
  163. // Disables RGBA_4444 textures.
  164. const char kDisableRGBA4444Textures[] = "disable-rgba-4444-textures";
  165. // Taints all <canvas> elements, regardless of origin.
  166. const char kDisableReadingFromCanvas[] = "disable-reading-from-canvas";
  167. // Disables remote web font support. SVG font should always work whether this
  168. // option is specified or not.
  169. const char kDisableRemoteFonts[] = "disable-remote-fonts";
  170. // Turns off the accessibility in the renderer.
  171. const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
  172. // Prevent renderer process backgrounding when set.
  173. const char kDisableRendererBackgrounding[] = "disable-renderer-backgrounding";
  174. // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
  175. const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox";
  176. // Disable the setuid sandbox (Linux only).
  177. const char kDisableSetuidSandbox[] = "disable-setuid-sandbox";
  178. // Disable shared workers.
  179. const char kDisableSharedWorkers[] = "disable-shared-workers";
  180. // Disable smooth scrolling for testing.
  181. const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
  182. // Disables the use of a 3D software rasterizer.
  183. const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
  184. // Disables the Web Speech API.
  185. const char kDisableSpeechAPI[] = "disable-speech-api";
  186. // Disables SVG 1.1 DOM.
  187. const char kDisableSVG1DOM[] = "disable-svg1dom";
  188. // Disable multithreaded GPU compositing of web content.
  189. const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
  190. // Disable multithreaded, compositor scrolling of web content.
  191. const char kDisableThreadedScrolling[] = "disable-threaded-scrolling";
  192. // Disable V8 idle tasks.
  193. const char kDisableV8IdleTasks[] = "disable-v8-idle-tasks";
  194. // Don't enforce the same-origin policy. (Used by people testing their sites.)
  195. const char kDisableWebSecurity[] = "disable-web-security";
  196. // Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
  197. const char kDisableXSSAuditor[] = "disable-xss-auditor";
  198. // Disable rasterizer that writes directly to GPU memory associated with tiles.
  199. const char kDisableZeroCopy[] = "disable-zero-copy";
  200. // Specifies if the |DOMAutomationController| needs to be bound in the
  201. // renderer. This binding happens on per-frame basis and hence can potentially
  202. // be a performance bottleneck. One should only enable it when automating dom
  203. // based tests.
  204. const char kDomAutomationController[] = "dom-automation";
  205. // Enable antialiasing on 2d canvas clips (as opposed to draw operations)
  206. const char kEnable2dCanvasClipAntialiasing[] = "enable-2d-canvas-clip-aa";
  207. // Disable partially decoding jpeg images using the GPU.
  208. // At least YUV decoding will be accelerated when not using this flag.
  209. // Has no effect unless GPU rasterization is enabled.
  210. const char kDisableAcceleratedJpegDecoding[] =
  211. "disable-accelerated-jpeg-decoding";
  212. // Enable bleeding-edge code to make Chrome draw content faster. The changes
  213. // behind this path are very likely to break lots of content.
  214. // ** DO NOT use this flag unless you know what you are doing. **
  215. const char kEnableBleedingEdgeRenderingFastPaths[] =
  216. "enable-bleeding-edge-rendering-fast-paths";
  217. // Enables new cc/animation system (Project Heaviside). crbug.com/394772
  218. const char kEnableCompositorAnimationTimelines[] =
  219. "enable-compositor-animation-timelines";
  220. // Enables LCD text.
  221. const char kEnableLCDText[] = "enable-lcd-text";
  222. // Enables using signed distance fields when rendering text.
  223. // Only valid if GPU rasterization is enabled as well.
  224. const char kEnableDistanceFieldText[] = "enable-distance-field-text";
  225. // Enable the experimental Credential Manager JavaScript API.
  226. const char kEnableCredentialManagerAPI[] = "enable-credential-manager-api";
  227. // Enable the creation of compositing layers when it would prevent LCD text.
  228. const char kEnablePreferCompositingToLCDText[] =
  229. "enable-prefer-compositing-to-lcd-text";
  230. // Disable one or more Blink runtime-enabled features.
  231. // Use names from RuntimeEnabledFeatures.in, separated by commas.
  232. // Applied before kDisableBlinkFeatures, and after other flags that change these
  233. // features.
  234. const char kEnableBlinkFeatures[] = "enable-blink-features";
  235. // PlzNavigate: Use the experimental browser-side navigation path.
  236. const char kEnableBrowserSideNavigation[] = "enable-browser-side-navigation";
  237. // Enables display list based 2d canvas implementation. Options:
  238. // 1. Enable: allow browser to use display list for 2d canvas (browser makes
  239. // decision).
  240. // 2. Force: browser always uses display list for 2d canvas.
  241. const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
  242. const char kForceDisplayList2dCanvas[] = "force-display-list-2d-canvas";
  243. const char kDisableDisplayList2dCanvas[] = "disable-display-list-2d-canvas";
  244. // Enables restarting interrupted downloads.
  245. const char kEnableDownloadResumption[] = "enable-download-resumption";
  246. // Disables (unprefixed) Encrypted Media Extensions.
  247. const char kDisableEncryptedMedia[] = "disable-encrypted-media";
  248. // Enable experimental canvas features, e.g. canvas 2D context attributes
  249. const char kEnableExperimentalCanvasFeatures[] =
  250. "enable-experimental-canvas-features";
  251. // Enables Web Platform features that are in development.
  252. const char kEnableExperimentalWebPlatformFeatures[] =
  253. "enable-experimental-web-platform-features";
  254. // Comma-separated list of feature names to enable. See also kDisableFeatures.
  255. const char kEnableFeatures[] = "enable-features";
  256. // Enable Web Bluetooth.
  257. const char kEnableWebBluetooth[] = "enable-web-bluetooth";
  258. // Enables TRACE for GL calls in the renderer.
  259. const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
  260. // Enable GpuMemoryBuffer backed VideoFrames.
  261. const char kEnableGpuMemoryBufferVideoFrames[] =
  262. "enable-gpu-memory-buffer-video-frames";
  263. // Allow heuristics to determine when a layer tile should be drawn with the
  264. // Skia GPU backend. Only valid with GPU accelerated compositing +
  265. // impl-side painting.
  266. const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
  267. // When using CPU rasterizing generate low resolution tiling. Low res
  268. // tiles may be displayed during fast scrolls especially on slower devices.
  269. const char kEnableLowResTiling[] = "enable-low-res-tiling";
  270. // Dynamically apply color profiles to web content images.
  271. const char kEnableImageColorProfiles[] = "enable-image-color-profiles";
  272. // Force logging to be enabled. Logging is disabled by default in release
  273. // builds.
  274. const char kEnableLogging[] = "enable-logging";
  275. // Enables the memory benchmarking extension
  276. const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking";
  277. // Enables the network information API.
  278. const char kEnableNetworkInformation[] = "enable-network-information";
  279. // Enables the use of persistent GPU memory buffers for partial raster.
  280. const char kEnablePersistentGpuMemoryBuffer[] =
  281. "enable-persistent-gpu-memory-buffer";
  282. // Enables compositor-accelerated touch-screen pinch gestures.
  283. const char kEnablePinch[] = "enable-pinch";
  284. // Enables testing features of the Plugin Placeholder. For internal use only.
  285. const char kEnablePluginPlaceholderTesting[] =
  286. "enable-plugin-placeholder-testing";
  287. // Make the values returned to window.performance.memory more granular and more
  288. // up to date in shared worker. Without this flag, the memory information is
  289. // still available, but it is bucketized and updated less frequently. This flag
  290. // also applys to workers.
  291. const char kEnablePreciseMemoryInfo[] = "enable-precise-memory-info";
  292. // Enables payloads for received push messages when using the W3C Push API.
  293. const char kEnablePushMessagePayload[] = "enable-push-message-payload";
  294. // Enables RGBA_4444 textures.
  295. const char kEnableRGBA4444Textures[] = "enable-rgba-4444-textures";
  296. // Set options to cache V8 data. (off, preparse data, or code)
  297. const char kV8CacheOptions[] = "v8-cache-options";
  298. // Signals that the V8 natives file has been transfered to the child process
  299. // by a file descriptor.
  300. const char kV8NativesPassedByFD[] = "v8-natives-passed-by-fd";
  301. // Signals that the V8 startup snapshot file has been transfered to the child
  302. // process by a file descriptor.
  303. const char kV8SnapshotPassedByFD[] = "v8-snapshot-passed-by-fd";
  304. // Cause the OS X sandbox write to syslog every time an access to a resource
  305. // is denied by the sandbox.
  306. const char kEnableSandboxLogging[] = "enable-sandbox-logging";
  307. // Enables seccomp-bpf support for Android. Requires experimental kernel
  308. // support. <http://crbug.com/166704>
  309. const char kEnableSeccompFilterSandbox[] =
  310. "enable-seccomp-filter-sandbox";
  311. // Enables the Skia benchmarking extension
  312. const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
  313. // Enables slimming paint phase 2: http://www.chromium.org/blink/slimming-paint
  314. const char kEnableSlimmingPaintV2[] = "enable-slimming-paint-v2";
  315. // On platforms that support it, enables smooth scroll animation.
  316. const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
  317. // Enable spatial navigation
  318. const char kEnableSpatialNavigation[] = "enable-spatial-navigation";
  319. // Enables StatsTable, logging statistics to a global named shared memory table.
  320. const char kEnableStatsTable[] = "enable-stats-table";
  321. // Blocks all insecure requests from secure contexts, and prevents the user
  322. // from overriding that decision.
  323. const char kEnableStrictMixedContentChecking[] =
  324. "enable-strict-mixed-content-checking";
  325. // Blocks insecure usage of number of powerful features (geolocation, for
  326. // example) that we haven't yet deprecated for the web at large.
  327. const char kEnableStrictPowerfulFeatureRestrictions[] =
  328. "enable-strict-powerful-feature-restrictions";
  329. // Enable use of experimental TCP sockets API for sending data in the
  330. // SYN packet.
  331. const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
  332. // Enabled threaded compositing for layout tests.
  333. const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
  334. // Enable tracing during the execution of browser tests.
  335. const char kEnableTracing[] = "enable-tracing";
  336. // The filename to write the output of the test tracing to.
  337. const char kEnableTracingOutput[] = "enable-tracing-output";
  338. // Enable screen capturing support for MediaStream API.
  339. const char kEnableUserMediaScreenCapturing[] =
  340. "enable-usermedia-screen-capturing";
  341. // Enables the use of the @viewport CSS rule, which allows
  342. // pages to control aspects of their own layout. This also turns on touch-screen
  343. // pinch gestures.
  344. const char kEnableViewport[] = "enable-viewport";
  345. // Enable the Vtune profiler support.
  346. const char kEnableVtune[] = "enable-vtune-support";
  347. // Enables WebGL extensions not yet approved by the community.
  348. const char kEnableWebGLDraftExtensions[] = "enable-webgl-draft-extensions";
  349. // Enables WebGL rendering into a scanout buffer for overlay support.
  350. const char kEnableWebGLImageChromium[] = "enable-webgl-image-chromium";
  351. // Enables interaction with virtual reality devices.
  352. const char kEnableWebVR[] = "enable-webvr";
  353. // Enable rasterizer that writes directly to GPU memory associated with tiles.
  354. const char kEnableZeroCopy[] = "enable-zero-copy";
  355. // Explicitly allows additional ports using a comma-separated list of port
  356. // numbers.
  357. const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
  358. // Load NPAPI plugins from the specified directory.
  359. const char kExtraPluginDir[] = "extra-plugin-dir";
  360. // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU
  361. // accelerated compositing + impl-side painting. Overrides the
  362. // kEnableGpuRasterization flag.
  363. const char kForceGpuRasterization[] = "force-gpu-rasterization";
  364. // The number of multisample antialiasing samples for GPU rasterization.
  365. // Requires MSAA support on GPU to have an effect. 0 disables MSAA.
  366. const char kGpuRasterizationMSAASampleCount[] =
  367. "gpu-rasterization-msaa-sample-count";
  368. // Forces use of hardware overlay for fullscreen video playback. Useful for
  369. // testing the Android overlay fullscreen functionality on other platforms.
  370. const char kForceOverlayFullscreenVideo[] = "force-overlay-fullscreen-video";
  371. // Force renderer accessibility to be on instead of enabling it on demand when
  372. // a screen reader is detected. The disable-renderer-accessibility switch
  373. // overrides this if present.
  374. const char kForceRendererAccessibility[] = "force-renderer-accessibility";
  375. // Passes gpu device_id from browser process to GPU process.
  376. const char kGpuDeviceID[] = "gpu-device-id";
  377. // Passes gpu driver_vendor from browser process to GPU process.
  378. const char kGpuDriverVendor[] = "gpu-driver-vendor";
  379. // Passes gpu driver_version from browser process to GPU process.
  380. const char kGpuDriverVersion[] = "gpu-driver-version";
  381. // Extra command line options for launching the GPU process (normally used
  382. // for debugging). Use like renderer-cmd-prefix.
  383. const char kGpuLauncher[] = "gpu-launcher";
  384. // Makes this process a GPU sub-process.
  385. const char kGpuProcess[] = "gpu-process";
  386. // Allows shmat() system call in the GPU sandbox.
  387. const char kGpuSandboxAllowSysVShm[] = "gpu-sandbox-allow-sysv-shm";
  388. // Makes GPU sandbox failures fatal.
  389. const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-failures-fatal";
  390. // Starts the GPU sandbox before creating a GL context.
  391. const char kGpuSandboxStartEarly[] = "gpu-sandbox-start-early";
  392. // Causes the GPU process to display a dialog on launch.
  393. const char kGpuStartupDialog[] = "gpu-startup-dialog";
  394. // Passes gpu vendor_id from browser process to GPU process.
  395. const char kGpuVendorID[] = "gpu-vendor-id";
  396. // These mappings only apply to the host resolver.
  397. const char kHostResolverRules[] = "host-resolver-rules";
  398. // Ignores certificate-related errors.
  399. const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
  400. // Ignores GPU blacklist.
  401. const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
  402. // Makes all APIs reflect the layout viewport.
  403. const char kInertVisualViewport[] = "inert-visual-viewport";
  404. // Run the GPU process as a thread in the browser process.
  405. const char kInProcessGPU[] = "in-process-gpu";
  406. // Overrides the timeout, in seconds, that a child process waits for a
  407. // connection from the browser before killing itself.
  408. const char kIPCConnectionTimeout[] = "ipc-connection-timeout";
  409. // Specifies the flags passed to JS engine
  410. const char kJavaScriptFlags[] = "js-flags";
  411. // Load an NPAPI plugin from the specified path.
  412. const char kLoadPlugin[] = "load-plugin";
  413. // Logs GPU control list decisions when enforcing blacklist rules.
  414. const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
  415. // Sets the minimum log level. Valid values are from 0 to 3:
  416. // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
  417. const char kLoggingLevel[] = "log-level";
  418. // Enables saving net log events to a file and sets the file name to use.
  419. const char kLogNetLog[] = "log-net-log";
  420. // Make plugin processes log their sent and received messages to VLOG(1).
  421. const char kLogPluginMessages[] = "log-plugin-messages";
  422. // Resizes of the main frame are caused by changing between landscape and
  423. // portrait mode (i.e. Android) so the page should be rescaled to fit.
  424. const char kMainFrameResizesAreOrientationChanges[] =
  425. "main-frame-resizes-are-orientation-changes";
  426. // Sets the width and height above which a composited layer will get tiled.
  427. const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
  428. const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
  429. // Sample memory usage with high frequency and store the results to the
  430. // Renderer.Memory histogram. Used in memory tests.
  431. const char kMemoryMetrics[] = "memory-metrics";
  432. // Mutes audio sent to the audio device so it is not audible during
  433. // automated testing.
  434. const char kMuteAudio[] = "mute-audio";
  435. // Don't send HTTP-Referer headers.
  436. const char kNoReferrers[] = "no-referrers";
  437. // Disables the sandbox for all process types that are normally sandboxed.
  438. const char kNoSandbox[] = "no-sandbox";
  439. // Enables appcontainer/lowbox for renderer on Win8+ platforms.
  440. const char kEnableAppContainer[] = "enable-appcontainer";
  441. // Number of worker threads used to rasterize content.
  442. const char kNumRasterThreads[] = "num-raster-threads";
  443. // Override the behavior of plugin throttling for testing.
  444. // By default the throttler is only enabled for a hard-coded list of plugins.
  445. // Set the value to 'never' to disable throttling.
  446. // Set the value to 'ignore-list' to ignore the hard-coded list.
  447. // Set the value to 'always' to always throttle every plugin instance.
  448. const char kOverridePluginPowerSaverForTesting[] =
  449. "override-plugin-power-saver-for-testing";
  450. // Controls the behavior of history navigation in response to horizontal
  451. // overscroll.
  452. // Set the value to '0' to disable.
  453. // Set the value to '1' to enable the behavior where pages slide in and out in
  454. // response to the horizontal overscroll gesture and a screenshot of the target
  455. // page is shown.
  456. // Set the value to '2' to enable the simplified overscroll UI where a
  457. // navigation arrow slides in from the side of the screen in response to the
  458. // horizontal overscroll gesture.
  459. // Defaults to '1'.
  460. const char kOverscrollHistoryNavigation[] =
  461. "overscroll-history-navigation";
  462. // Specifies a command that should be used to launch the plugin process. Useful
  463. // for running the plugin process through purify or quantify. Ex:
  464. // --plugin-launcher="path\to\purify /Run=yes"
  465. const char kPluginLauncher[] = "plugin-launcher";
  466. // Tells the plugin process the path of the plugin to load
  467. const char kPluginPath[] = "plugin-path";
  468. // Causes the process to run as a plugin subprocess.
  469. const char kPluginProcess[] = "plugin";
  470. // Causes the plugin process to display a dialog on launch.
  471. const char kPluginStartupDialog[] = "plugin-startup-dialog";
  472. // Argument to the process type that indicates a PPAPI broker process type.
  473. const char kPpapiBrokerProcess[] = "ppapi-broker";
  474. // "Command-line" arguments for the PPAPI Flash; used for debugging options.
  475. const char kPpapiFlashArgs[] = "ppapi-flash-args";
  476. // Runs PPAPI (Pepper) plugins in-process.
  477. const char kPpapiInProcess[] = "ppapi-in-process";
  478. // Like kPluginLauncher for PPAPI plugins.
  479. const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
  480. // Argument to the process type that indicates a PPAPI plugin process type.
  481. const char kPpapiPluginProcess[] = "ppapi";
  482. // Causes the PPAPI sub process to display a dialog on launch. Be sure to use
  483. // --no-sandbox as well or the sandbox won't allow the dialog to display.
  484. const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
  485. // Runs a single process for each site (i.e., group of pages from the same
  486. // registered domain) the user visits. We default to using a renderer process
  487. // for each site instance (i.e., group of pages from the same registered
  488. // domain with script connections to each other).
  489. const char kProcessPerSite[] = "process-per-site";
  490. // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
  491. // renderer process. We default to using a renderer process for each
  492. // site instance (i.e., group of pages from the same registered domain with
  493. // script connections to each other).
  494. const char kProcessPerTab[] = "process-per-tab";
  495. // The value of this switch determines whether the process is started as a
  496. // renderer or plugin host. If it's empty, it's the browser.
  497. const char kProcessType[] = "type";
  498. // Enables more web features over insecure connections. Designed to be used
  499. // for testing purposes only.
  500. const char kReduceSecurityForTesting[] = "reduce-security-for-testing";
  501. // Register Pepper plugins (see pepper_plugin_list.cc for its format).
  502. const char kRegisterPepperPlugins[] = "register-pepper-plugins";
  503. // Enables remote debug over HTTP on the specified port.
  504. const char kRemoteDebuggingPort[] = "remote-debugging-port";
  505. // The contents of this flag are prepended to the renderer command line.
  506. // Useful values might be "valgrind" or "xterm -e gdb --args".
  507. const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
  508. // Causes the process to run as renderer instead of as browser.
  509. const char kRendererProcess[] = "renderer";
  510. // Overrides the default/calculated limit to the number of renderer processes.
  511. // Very high values for this setting can lead to high memory/resource usage
  512. // or instability.
  513. const char kRendererProcessLimit[] = "renderer-process-limit";
  514. // Causes the renderer process to display a dialog on launch.
  515. const char kRendererStartupDialog[] = "renderer-startup-dialog";
  516. // Reduce the default `referer` header's granularity.
  517. const char kReducedReferrerGranularity[] =
  518. "reduced-referrer-granularity";
  519. // Handles frame scrolls via the root RenderLayer instead of the FrameView.
  520. const char kRootLayerScrolls[] = "root-layer-scrolls";
  521. // Causes the process to run as a sandbox IPC subprocess.
  522. const char kSandboxIPCProcess[] = "sandbox-ipc";
  523. // Enables or disables scroll end effect in response to vertical overscroll.
  524. // Set the value to '1' to enable the feature, and set to '0' to disable.
  525. // Defaults to disabled.
  526. const char kScrollEndEffect[] = "scroll-end-effect";
  527. // Visibly render a border around paint rects in the web page to help debug
  528. // and study painting behavior.
  529. const char kShowPaintRects[] = "show-paint-rects";
  530. // Runs the renderer and plugins in the same process as the browser
  531. const char kSingleProcess[] = "single-process";
  532. // Enforces a one-site-per-process security policy:
  533. // * Each renderer process, for its whole lifetime, is dedicated to rendering
  534. // pages for just one site.
  535. // * Thus, pages from different sites are never in the same process.
  536. // * A renderer process's access rights are restricted based on its site.
  537. // * All cross-site navigations force process swaps.
  538. // * <iframe>s are rendered out-of-process whenever the src= is cross-site.
  539. //
  540. // More details here:
  541. // http://www.chromium.org/developers/design-documents/site-isolation
  542. const char kSitePerProcess[] = "site-per-process";
  543. // Skip gpu info collection, blacklist loading, and blacklist auto-update
  544. // scheduling at browser startup time.
  545. // Therefore, all GPU features are available, and about:gpu page shows empty
  546. // content. The switch is intended only for layout tests.
  547. // TODO(gab): Get rid of this switch entirely.
  548. const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
  549. // Specifies if the browser should start in fullscreen mode, like if the user
  550. // had pressed F11 right after startup.
  551. const char kStartFullscreen[] = "start-fullscreen";
  552. // Specifies if the |StatsCollectionController| needs to be bound in the
  553. // renderer. This binding happens on per-frame basis and hence can potentially
  554. // be a performance bottleneck. One should only enable it when running a test
  555. // that needs to access the provided statistics.
  556. const char kStatsCollectionController[] =
  557. "enable-stats-collection-bindings";
  558. // Upscale defaults to "good".
  559. const char kTabCaptureDownscaleQuality[] = "tab-capture-downscale-quality";
  560. // Scaling quality for capturing tab. Should be one of "fast", "good" or "best".
  561. // One flag for upscaling, one for downscaling.
  562. // Upscale defaults to "best".
  563. const char kTabCaptureUpscaleQuality[] = "tab-capture-upscale-quality";
  564. // Allows for forcing socket connections to http/https to use fixed ports.
  565. const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
  566. const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
  567. // Type of the current test harness ("browser" or "ui").
  568. const char kTestType[] = "test-type";
  569. // Controls how text selection granularity changes when touch text selection
  570. // handles are dragged. Should be "character" or "direction". If not specified,
  571. // the platform default is used.
  572. const char kTouchTextSelectionStrategy[] = "touch-selection-strategy";
  573. // Prioritizes the UI's command stream in the GPU process
  574. const char kUIPrioritizeInGpuProcess[] = "ui-prioritize-in-gpu-process";
  575. // Bypass the media stream infobar by selecting the default device for media
  576. // streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
  577. const char kUseFakeUIForMediaStream[] = "use-fake-ui-for-media-stream";
  578. // Enable native GPU memory buffer support when available.
  579. const char kEnableNativeGpuMemoryBuffers[] = "enable-native-gpu-memory-buffers";
  580. // Texture target for CHROMIUM_image backed content textures.
  581. const char kContentImageTextureTarget[] = "content-image-texture-target";
  582. // Texture target for CHROMIUM_image backed video frame textures.
  583. const char kVideoImageTextureTarget[] = "video-image-texture-target";
  584. // Set when Chromium should use a mobile user agent.
  585. const char kUseMobileUserAgent[] = "use-mobile-user-agent";
  586. // Use normal priority for tile task worker threads. Otherwise they may
  587. // be run at background priority on some platforms.
  588. const char kUseNormalPriorityForTileTaskWorkerThreads[] =
  589. "use-normal-priority-for-tile-task-worker-threads";
  590. // Use the new surfaces system to handle compositor delegation.
  591. const char kUseSurfaces[] = "use-surfaces";
  592. // Disable the use of the new surfaces system to handle compositor delegation.
  593. const char kDisableSurfaces[] = "disable-surfaces";
  594. // The contents of this flag are prepended to the utility process command line.
  595. // Useful values might be "valgrind" or "xterm -e gdb --args".
  596. const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
  597. // Causes the process to run as a utility subprocess.
  598. const char kUtilityProcess[] = "utility";
  599. // The utility process is sandboxed, with access to one directory. This flag
  600. // specifies the directory that can be accessed.
  601. const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
  602. // Allows MDns to access network in sandboxed process.
  603. const char kUtilityProcessEnableMDns[] = "utility-enable-mdns";
  604. const char kUtilityProcessRunningElevated[] = "utility-run-elevated";
  605. // In debug builds, asserts that the stream of input events is valid.
  606. const char kValidateInputEventStream[] = "validate-input-event-stream";
  607. // Will add kWaitForDebugger to every child processes. If a value is passed, it
  608. // will be used as a filter to determine if the child process should have the
  609. // kWaitForDebugger flag passed on or not.
  610. const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
  611. // The prefix used when starting the zygote process. (i.e. 'gdb --args')
  612. const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
  613. // Causes the process to run as a renderer zygote.
  614. const char kZygoteProcess[] = "zygote";
  615. #if defined(ENABLE_WEBRTC)
  616. // Disables HW decode acceleration for WebRTC.
  617. const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
  618. // Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
  619. // ignores this switch on its stable and beta channels.
  620. const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
  621. // Disables HW encode acceleration for WebRTC.
  622. const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
  623. // Enables negotiation of DTLS 1.2 for WebRTC.
  624. const char kEnableWebRtcDtls12[] = "enable-webrtc-dtls12";
  625. // Enables H264 HW encode acceleration for WebRTC.
  626. const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
  627. // Enables Origin header in Stun messages for WebRTC.
  628. const char kEnableWebRtcStunOrigin[] = "enable-webrtc-stun-origin";
  629. // Renderer process parameter for WebRTC Stun probe trial to determine the
  630. // interval. Please see SetupStunProbeTrial in
  631. // chrome_browser_field_trials_desktop.cc for more detail.
  632. const char kWebRtcStunProbeTrialParameter[] = "webrtc-stun-probe-trial";
  633. // Override the maximum framerate as can be specified in calls to getUserMedia.
  634. // This flag expects a value. Example: --max-gum-fps=17.5
  635. const char kWebRtcMaxCaptureFramerate[] = "max-gum-fps";
  636. #endif
  637. #if defined(OS_ANDROID)
  638. // Disable user gesture requirement for media playback.
  639. const char kDisableGestureRequirementForMediaPlayback[] =
  640. "disable-gesture-requirement-for-media-playback";
  641. // Disable overscroll edge effects like those found in Android views.
  642. const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect";
  643. // Disable the pull-to-refresh effect when vertically overscrolling content.
  644. const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect";
  645. // Disable the locking feature of the screen orientation API.
  646. const char kDisableScreenOrientationLock[] = "disable-screen-orientation-lock";
  647. // Enable external animation system for Android compositor.
  648. // See also kEnableCompositorAnimationTimelines for renderer compositors.
  649. const char kEnableAndroidCompositorAnimationTimelines[] =
  650. "enable-android-compositor-animation-timelines";
  651. // Enable drag manipulation of longpress-triggered text selections.
  652. const char kEnableLongpressDragSelection[] = "enable-longpress-drag-selection";
  653. // The telephony region (ISO country code) to use in phone number detection.
  654. const char kNetworkCountryIso[] = "network-country-iso";
  655. // Enables remote debug over HTTP on the specified socket name.
  656. const char kRemoteDebuggingSocketName[] = "remote-debugging-socket-name";
  657. // Block ChildProcessMain thread of the renderer's ChildProcessService until a
  658. // Java debugger is attached.
  659. const char kRendererWaitForJavaDebugger[] = "renderer-wait-for-java-debugger";
  660. #endif
  661. // Enable the aggressive flushing of DOM Storage to minimize data loss.
  662. const char kEnableAggressiveDOMStorageFlushing[] =
  663. "enable-aggressive-domstorage-flushing";
  664. // Disable web audio API.
  665. const char kDisableWebAudio[] = "disable-webaudio";
  666. #if defined(OS_CHROMEOS)
  667. // Disables panel fitting (used for mirror mode).
  668. const char kDisablePanelFitting[] = "disable-panel-fitting";
  669. // Disables VA-API accelerated video encode.
  670. const char kDisableVaapiAcceleratedVideoEncode[] =
  671. "disable-vaapi-accelerated-video-encode";
  672. #endif
  673. #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  674. // Allows sending text-to-speech requests to speech-dispatcher, a common
  675. // Linux speech service. Because it's buggy, the user must explicitly
  676. // enable it so that visiting a random webpage can't cause instability.
  677. const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
  678. #endif
  679. #if defined(OS_MACOSX) && !defined(OS_IOS)
  680. // Disables support for Core Animation plugins. This is triggered when
  681. // accelerated compositing is disabled. See http://crbug.com/122430.
  682. const char kDisableCoreAnimationPlugins[] =
  683. "disable-core-animation-plugins";
  684. #endif
  685. #if defined(OS_WIN)
  686. // Device scale factor passed to certain processes like renderers, etc.
  687. const char kDeviceScaleFactor[] = "device-scale-factor";
  688. // Disable the Legacy Window which corresponds to the size of the WebContents.
  689. const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
  690. // Disables the Win32K process mitigation policy for renderer processes.
  691. const char kDisableWin32kRendererLockDown[] =
  692. "disable-win32k-renderer-lockdown";
  693. // Enables the Win32K process mitigation policy for certain PPAPI mime
  694. // types. Each mime type is separated by a comma. Specify * to enable
  695. // the policy for all mime types.
  696. const char kEnableWin32kLockDownMimeTypes[] =
  697. "enable-win32k-lockdown-mimetypes";
  698. // Enables experimental hardware acceleration for VP8/VP9 video decoding.
  699. const char kEnableAcceleratedVpxDecode[] = "enable-accelerated-vpx-decode";
  700. // DirectWrite FontCache is shared by browser to renderers using shared memory.
  701. // This switch allows us to pass the shared memory handle to the renderer.
  702. const char kFontCacheSharedHandle[] = "font-cache-shared-handle";
  703. // Sets the free memory thresholds below which the system is considered to be
  704. // under moderate and critical memory pressure. Used in the browser process,
  705. // and ignored if invalid. Specified as a pair of comma separated integers.
  706. // See base/win/memory_pressure_monitor.cc for defaults.
  707. const char kMemoryPressureThresholdsMb[] = "memory-pressure-thresholds-mb";
  708. // Enables the exporting of the tracing events to ETW. This is only supported on
  709. // Windows Vista and later.
  710. const char kTraceExportEventsToETW[] = "trace-export-events-to-etw";
  711. #endif
  712. // Don't dump stuff here, follow the same order as the header.
  713. } // namespace switches