| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/public/common/content_switches.h" | 5 #include "content/public/common/content_switches.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 | 8 |
| 9 namespace switches { | 9 namespace switches { |
| 10 | 10 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 // Disable the limit on the number of times the GPU process may be restarted | 200 // Disable the limit on the number of times the GPU process may be restarted |
| 201 // This switch is intended only for tests. | 201 // This switch is intended only for tests. |
| 202 extern const char kDisableGpuProcessCrashLimit[] = | 202 extern const char kDisableGpuProcessCrashLimit[] = |
| 203 "disable-gpu-process-crash-limit"; | 203 "disable-gpu-process-crash-limit"; |
| 204 | 204 |
| 205 // Do not launch the GPU process shortly after browser process launch. Instead | 205 // Do not launch the GPU process shortly after browser process launch. Instead |
| 206 // launch it when it is first needed. | 206 // launch it when it is first needed. |
| 207 const char kDisableGpuProcessPrelaunch[] = "disable-gpu-process-prelaunch"; | 207 const char kDisableGpuProcessPrelaunch[] = "disable-gpu-process-prelaunch"; |
| 208 | 208 |
| 209 // Disable GPU rasterization, i.e. rasterize on the CPU only. |
| 210 // Overrides the kEnableGpuRasterization and kForceGpuRasterization flags. |
| 211 const char kDisableGpuRasterization[] = "disable-gpu-rasterization"; |
| 212 |
| 209 // Disable the GPU process sandbox. | 213 // Disable the GPU process sandbox. |
| 210 const char kDisableGpuSandbox[] = "disable-gpu-sandbox"; | 214 const char kDisableGpuSandbox[] = "disable-gpu-sandbox"; |
| 211 | 215 |
| 212 // Disable the thread that crashes the GPU process if it stops responding to | 216 // Disable the thread that crashes the GPU process if it stops responding to |
| 213 // messages. | 217 // messages. |
| 214 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; | 218 const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; |
| 215 | 219 |
| 216 // Suppresses hang monitor dialogs in renderer processes. This may allow slow | 220 // Suppresses hang monitor dialogs in renderer processes. This may allow slow |
| 217 // unload handlers on a page to prevent the tab from closing, but the Task | 221 // unload handlers on a page to prevent the tab from closing, but the Task |
| 218 // Manager can be used to terminate the offending process in this case. | 222 // Manager can be used to terminate the offending process in this case. |
| 219 const char kDisableHangMonitor[] = "disable-hang-monitor"; | 223 const char kDisableHangMonitor[] = "disable-hang-monitor"; |
| 220 | 224 |
| 221 // Disable the RenderThread's HistogramCustomizer. | 225 // Disable the RenderThread's HistogramCustomizer. |
| 222 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer"; | 226 const char kDisableHistogramCustomizer[] = "disable-histogram-customizer"; |
| 223 | 227 |
| 228 // Paint content on the main thread instead of the compositor thread. |
| 229 // Overrides the kEnableImplSidePainting flag. |
| 230 const char kDisableImplSidePainting[] = "disable-impl-side-painting"; |
| 231 |
| 224 // Prevent Java from running. | 232 // Prevent Java from running. |
| 225 const char kDisableJava[] = "disable-java"; | 233 const char kDisableJava[] = "disable-java"; |
| 226 | 234 |
| 227 // Don't execute JavaScript (browser JS like the new tab page still runs). | 235 // Don't execute JavaScript (browser JS like the new tab page still runs). |
| 228 const char kDisableJavaScript[] = "disable-javascript"; | 236 const char kDisableJavaScript[] = "disable-javascript"; |
| 229 | 237 |
| 230 // Don't kill a child process when it sends a bad IPC message. Apart | 238 // Don't kill a child process when it sends a bad IPC message. Apart |
| 231 // from testing, it is a bad idea from a security perspective to enable | 239 // from testing, it is a bad idea from a security perspective to enable |
| 232 // this switch. | 240 // this switch. |
| 233 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc"; | 241 const char kDisableKillAfterBadIPC[] = "disable-kill-after-bad-ipc"; |
| 234 | 242 |
| 235 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()). | 243 // Disables prefixed Encrypted Media API (e.g. webkitGenerateKeyRequest()). |
| 236 const char kDisablePrefixedEncryptedMedia[] = | 244 const char kDisablePrefixedEncryptedMedia[] = |
| 237 "disable-prefixed-encrypted-media"; | 245 "disable-prefixed-encrypted-media"; |
| 238 | 246 |
| 247 // Disables LCD text. |
| 248 const char kDisableLCDText[] = "disable-lcd-text"; |
| 249 |
| 239 // Disable LocalStorage. | 250 // Disable LocalStorage. |
| 240 const char kDisableLocalStorage[] = "disable-local-storage"; | 251 const char kDisableLocalStorage[] = "disable-local-storage"; |
| 241 | 252 |
| 242 // Force logging to be disabled. Logging is enabled by default in debug | 253 // Force logging to be disabled. Logging is enabled by default in debug |
| 243 // builds. | 254 // builds. |
| 244 const char kDisableLogging[] = "disable-logging"; | 255 const char kDisableLogging[] = "disable-logging"; |
| 245 | 256 |
| 257 // Disable rasterizer that writes directly to GPU memory. |
| 258 // Overrides the kEnableMapImage flag. |
| 259 const char kDisableMapImage[] = "disable-map-image"; |
| 260 |
| 246 // Disables overlay scrollbars on Aura or Linux. Does nothing on Mac. | 261 // Disables overlay scrollbars on Aura or Linux. Does nothing on Mac. |
| 247 const char kDisableOverlayScrollbar[] = "disable-overlay-scrollbar"; | 262 const char kDisableOverlayScrollbar[] = "disable-overlay-scrollbar"; |
| 248 | 263 |
| 249 // Disable Pepper3D. | 264 // Disable Pepper3D. |
| 250 const char kDisablePepper3d[] = "disable-pepper-3d"; | 265 const char kDisablePepper3d[] = "disable-pepper-3d"; |
| 251 | 266 |
| 252 // Disables compositor-accelerated touch-screen pinch gestures. | 267 // Disables compositor-accelerated touch-screen pinch gestures. |
| 253 const char kDisablePinch[] = "disable-pinch"; | 268 const char kDisablePinch[] = "disable-pinch"; |
| 254 | 269 |
| 255 // Prevent plugins from running. | 270 // Prevent plugins from running. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // Enables accelerated compositing for backgrounds of root layers with | 359 // Enables accelerated compositing for backgrounds of root layers with |
| 345 // background-attachment: fixed. Requires kForceCompositingMode. | 360 // background-attachment: fixed. Requires kForceCompositingMode. |
| 346 const char kEnableAcceleratedFixedRootBackground[] = | 361 const char kEnableAcceleratedFixedRootBackground[] = |
| 347 "enable-accelerated-fixed-root-background"; | 362 "enable-accelerated-fixed-root-background"; |
| 348 | 363 |
| 349 // Enables accelerated compositing for overflow scroll. Promotes eligible | 364 // Enables accelerated compositing for overflow scroll. Promotes eligible |
| 350 // overflow:scroll elements to layers to enable accelerated scrolling for them. | 365 // overflow:scroll elements to layers to enable accelerated scrolling for them. |
| 351 const char kEnableAcceleratedOverflowScroll[] = | 366 const char kEnableAcceleratedOverflowScroll[] = |
| 352 "enable-accelerated-overflow-scroll"; | 367 "enable-accelerated-overflow-scroll"; |
| 353 | 368 |
| 369 // Enables LCD text. |
| 370 const char kEnableLCDText[] = "enable-lcd-text"; |
| 371 |
| 354 // Enables experimental feature that maps multiple RenderLayers to | 372 // Enables experimental feature that maps multiple RenderLayers to |
| 355 // one composited layer to avoid pathological layer counts. | 373 // one composited layer to avoid pathological layer counts. |
| 356 const char kEnableLayerSquashing[] = | 374 const char kEnableLayerSquashing[] = |
| 357 "enable-layer-squashing"; | 375 "enable-layer-squashing"; |
| 358 | 376 |
| 359 // Enables accelerated compositing for scrollable frames for accelerated | 377 // Enables accelerated compositing for scrollable frames for accelerated |
| 360 // scrolling for them. Requires kForceCompositingMode. | 378 // scrolling for them. Requires kForceCompositingMode. |
| 361 const char kEnableAcceleratedScrollableFrames[] = | 379 const char kEnableAcceleratedScrollableFrames[] = |
| 362 "enable-accelerated-scrollable-frames"; | 380 "enable-accelerated-scrollable-frames"; |
| 363 | 381 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 453 |
| 436 const char kEnableFixedPositionCreatesStackingContext[] | 454 const char kEnableFixedPositionCreatesStackingContext[] |
| 437 = "enable-fixed-position-creates-stacking-context"; | 455 = "enable-fixed-position-creates-stacking-context"; |
| 438 | 456 |
| 439 // Enable Gesture Tap Highlight | 457 // Enable Gesture Tap Highlight |
| 440 const char kEnableGestureTapHighlight[] = "enable-gesture-tap-highlight"; | 458 const char kEnableGestureTapHighlight[] = "enable-gesture-tap-highlight"; |
| 441 | 459 |
| 442 // Enables TRACE for GL calls in the renderer. | 460 // Enables TRACE for GL calls in the renderer. |
| 443 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing"; | 461 const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing"; |
| 444 | 462 |
| 463 // Allow heuristics to determine when a layer tile should be drawn with the |
| 464 // Skia GPU backend. Only valid with GPU accelerated compositing + |
| 465 // impl-side painting. |
| 466 const char kEnableGpuRasterization[] = "enable-gpu-rasterization"; |
| 467 |
| 445 // See comment for kEnableCompositingForFixedPosition. | 468 // See comment for kEnableCompositingForFixedPosition. |
| 446 const char kEnableHighDpiCompositingForFixedPosition[] = | 469 const char kEnableHighDpiCompositingForFixedPosition[] = |
| 447 "enable-high-dpi-fixed-position-compositing"; | 470 "enable-high-dpi-fixed-position-compositing"; |
| 448 | 471 |
| 449 #if defined(OS_WIN) | 472 #if defined(OS_WIN) |
| 450 // Disable the Legacy Window which corresponds to the size of the WebContents. | 473 // Disable the Legacy Window which corresponds to the size of the WebContents. |
| 451 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window"; | 474 const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window"; |
| 452 | 475 |
| 453 // Enables the DirectWrite font rendering system on windows. | 476 // Enables the DirectWrite font rendering system on windows. |
| 454 const char kEnableDirectWrite[] = "enable-direct-write"; | 477 const char kEnableDirectWrite[] = "enable-direct-write"; |
| 455 | 478 |
| 456 // Use high resolution timers for TimeTicks. | 479 // Use high resolution timers for TimeTicks. |
| 457 const char kEnableHighResolutionTime[] = "enable-high-resolution-time"; | 480 const char kEnableHighResolutionTime[] = "enable-high-resolution-time"; |
| 458 #endif | 481 #endif |
| 459 | 482 |
| 460 // Enable HTML Imports | 483 // Enable HTML Imports |
| 461 extern const char kEnableHTMLImports[] = "enable-html-imports"; | 484 extern const char kEnableHTMLImports[] = "enable-html-imports"; |
| 462 | 485 |
| 486 // Paint content on the compositor thread instead of the main thread. |
| 487 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; |
| 488 |
| 463 // Enables support for inband text tracks in media content. | 489 // Enables support for inband text tracks in media content. |
| 464 const char kEnableInbandTextTracks[] = "enable-inband-text-tracks"; | 490 const char kEnableInbandTextTracks[] = "enable-inband-text-tracks"; |
| 465 | 491 |
| 466 // Force logging to be enabled. Logging is disabled by default in release | 492 // Force logging to be enabled. Logging is disabled by default in release |
| 467 // builds. | 493 // builds. |
| 468 const char kEnableLogging[] = "enable-logging"; | 494 const char kEnableLogging[] = "enable-logging"; |
| 469 | 495 |
| 496 // Enable rasterizer that writes directly to GPU memory. |
| 497 const char kEnableMapImage[] = "enable-map-image"; |
| 498 |
| 470 // Enables the memory benchmarking extension | 499 // Enables the memory benchmarking extension |
| 471 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking"; | 500 const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking"; |
| 472 | 501 |
| 473 // On Windows, converts the page to the currently-installed monitor profile. | 502 // On Windows, converts the page to the currently-installed monitor profile. |
| 474 // This does NOT enable color management for images. The source is still | 503 // This does NOT enable color management for images. The source is still |
| 475 // assumed to be sRGB. | 504 // assumed to be sRGB. |
| 476 const char kEnableMonitorProfile[] = "enable-monitor-profile"; | 505 const char kEnableMonitorProfile[] = "enable-monitor-profile"; |
| 477 | 506 |
| 478 // Enables use of cache if offline, even if it's stale | 507 // Enables use of cache if offline, even if it's stale |
| 479 const char kEnableOfflineCacheAccess[] = "enable-offline-cache-access"; | 508 const char kEnableOfflineCacheAccess[] = "enable-offline-cache-access"; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // Some field trials may be randomized in the browser, and the randomly selected | 639 // Some field trials may be randomized in the browser, and the randomly selected |
| 611 // outcome needs to be propagated to the renderer. For instance, this is used | 640 // outcome needs to be propagated to the renderer. For instance, this is used |
| 612 // to modify histograms recorded in the renderer, or to get the renderer to | 641 // to modify histograms recorded in the renderer, or to get the renderer to |
| 613 // also set of its state (initialize, or not initialize components) to match the | 642 // also set of its state (initialize, or not initialize components) to match the |
| 614 // experiment(s). The option is also useful for forcing field trials when | 643 // experiment(s). The option is also useful for forcing field trials when |
| 615 // testing changes locally. The argument is a list of name and value pairs, | 644 // testing changes locally. The argument is a list of name and value pairs, |
| 616 // separated by slashes. See FieldTrialList::CreateTrialsFromString() in | 645 // separated by slashes. See FieldTrialList::CreateTrialsFromString() in |
| 617 // field_trial.h for details. | 646 // field_trial.h for details. |
| 618 const char kForceFieldTrials[] = "force-fieldtrials"; | 647 const char kForceFieldTrials[] = "force-fieldtrials"; |
| 619 | 648 |
| 649 // Always use the Skia GPU backend for drawing layer tiles. Only valid with GPU |
| 650 // accelerated compositing + impl-side painting. Overrides the |
| 651 // kEnableGpuRasterization flag. |
| 652 const char kForceGpuRasterization[] = "force-gpu-rasterization"; |
| 653 |
| 620 // Force renderer accessibility to be on instead of enabling it on demand when | 654 // Force renderer accessibility to be on instead of enabling it on demand when |
| 621 // a screen reader is detected. The disable-renderer-accessibility switch | 655 // a screen reader is detected. The disable-renderer-accessibility switch |
| 622 // overrides this if present. | 656 // overrides this if present. |
| 623 const char kForceRendererAccessibility[] = "force-renderer-accessibility"; | 657 const char kForceRendererAccessibility[] = "force-renderer-accessibility"; |
| 624 | 658 |
| 625 // Passes gpu device_id from browser process to GPU process. | 659 // Passes gpu device_id from browser process to GPU process. |
| 626 const char kGpuDeviceID[] = "gpu-device-id"; | 660 const char kGpuDeviceID[] = "gpu-device-id"; |
| 627 | 661 |
| 628 // Passes gpu driver_vendor from browser process to GPU process. | 662 // Passes gpu driver_vendor from browser process to GPU process. |
| 629 const char kGpuDriverVendor[] = "gpu-driver-vendor"; | 663 const char kGpuDriverVendor[] = "gpu-driver-vendor"; |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 #endif | 1076 #endif |
| 1043 | 1077 |
| 1044 #if defined(OS_POSIX) | 1078 #if defined(OS_POSIX) |
| 1045 // Causes the child processes to cleanly exit via calling exit(). | 1079 // Causes the child processes to cleanly exit via calling exit(). |
| 1046 const char kChildCleanExit[] = "child-clean-exit"; | 1080 const char kChildCleanExit[] = "child-clean-exit"; |
| 1047 #endif | 1081 #endif |
| 1048 | 1082 |
| 1049 // Don't dump stuff here, follow the same order as the header. | 1083 // Don't dump stuff here, follow the same order as the header. |
| 1050 | 1084 |
| 1051 } // namespace switches | 1085 } // namespace switches |
| OLD | NEW |