// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/public/common/content_switches.h" namespace switches { // By default, file:// URIs cannot read other file:// URIs. This is an // override for developers who need the old behavior for testing. const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files"; // Allows debugging of sandboxed processes (see zygote_main_linux.cc). const char kAllowSandboxDebugging[] = "allow-sandbox-debugging"; // Allow compositing on chrome:// pages. const char kAllowWebUICompositing[] = "allow-webui-compositing"; // Enumerates and prints a child process' most dangerous handles when it // is terminated. const char kAuditHandles[] = "enable-handle-auditing"; // The same as kAuditHandles except all handles are enumerated. const char kAuditAllHandles[] = "enable-handle-auditing-all"; // Causes the browser process to throw an assertion on startup. const char kBrowserAssertTest[] = "assert-test"; // Causes the browser process to crash on startup. const char kBrowserCrashTest[] = "crash-test"; // Path to the exe to run for the renderer and plugin subprocesses. const char kBrowserSubprocessPath[] = "browser-subprocess-path"; // Disables client-visible 3D APIs, in particular WebGL and Pepper 3D. // This is controlled by policy and is kept separate from the other // enable/disable switches to avoid accidentally regressing the policy // support for controlling access to these APIs. const char kDisable3DAPIs[] = "disable-3d-apis"; // Disable gpu-accelerated 2d canvas. const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas"; // Disable antialiasing on 2d canvas. const char kDisable2dCanvasAntialiasing[] = "disable-canvas-aa"; // Disables accelerated compositing. const char kDisableAcceleratedCompositing[] = "disable-accelerated-compositing"; // Disables the hardware acceleration of 3D CSS and animation. const char kDisableAcceleratedLayers[] = "disable-accelerated-layers"; // Disables the hardware acceleration of plugins. const char kDisableAcceleratedPlugins[] = "disable-accelerated-plugins"; // Disables GPU accelerated video display. const char kDisableAcceleratedVideo[] = "disable-accelerated-video"; // Disables the alternate window station for the renderer. const char kDisableAltWinstation[] = "disable-winsta"; // Disable the ApplicationCache. const char kDisableApplicationCache[] = "disable-application-cache"; // // TODO(scherkus): remove --disable-audio when we have a proper fallback // mechanism. const char kDisableAudio[] = "disable-audio"; // Disable limits on the number of backing stores. Can prevent blinking for // users with many windows/tabs and lots of memory. const char kDisableBackingStoreLimit[] = "disable-backing-store-limit"; // Disables HTML5 DB support. const char kDisableDatabases[] = "disable-databases"; // Disables data transfer items. const char kDisableDataTransferItems[] = "disable-data-transfer-items"; // Disables desktop notifications (default enabled on windows). const char kDisableDesktopNotifications[] = "disable-desktop-notifications"; // Disables device orientation events. const char kDisableDeviceOrientation[] = "disable-device-orientation"; #if defined(OS_ANDROID) // WebGL is disabled by default on Android. const char kEnableExperimentalWebGL[] = "enable-webgl"; #else // Disable experimental WebGL support. const char kDisableExperimentalWebGL[] = "disable-webgl"; #endif // Blacklist the GPU for accelerated compositing. const char kBlacklistAcceleratedCompositing[] = "blacklist-accelerated-compositing"; // Blacklist the GPU for WebGL. const char kBlacklistWebGL[] = "blacklist-webgl"; // Disable FileSystem API. const char kDisableFileSystem[] = "disable-file-system"; // Disable 3D inside of flapper. const char kDisableFlash3d[] = "disable-flash-3d"; // Disable using 3D to present fullscreen flash const char kDisableFlashFullscreen3d[] = "disable-flash-fullscreen-3d"; // Disable Stage3D inside of flapper. const char kDisableFlashStage3d[] = "disable-flash-stage3d"; // Suppresses support for the Geolocation javascript API. const char kDisableGeolocation[] = "disable-geolocation"; // Disable GL multisampling. const char kDisableGLMultisampling[] = "disable-gl-multisampling"; // Do not launch the GPU process shortly after browser process launch. Instead // launch it when it is first needed. const char kDisableGpuProcessPrelaunch[] = "disable-gpu-process-prelaunch"; // Disable the GPU process sandbox. const char kDisableGpuSandbox[] = "disable-gpu-sandbox"; // Reduces the GPU process sandbox to be less strict. const char kReduceGpuSandbox[] = "reduce-gpu-sandbox"; // Enable the GPU process sandbox (Linux/Chrome OS only for now). const char kEnableGpuSandbox[] = "enable-gpu-sandbox"; // Suppresses hang monitor dialogs in renderer processes. This may allow slow // unload handlers on a page to prevent the tab from closing, but the Task // Manager can be used to terminate the offending process in this case. const char kDisableHangMonitor[] = "disable-hang-monitor"; // Disable the RenderThread's HistogramCustomizer. const char kDisableHistogramCustomizer[] = "disable-histogram-customizer"; // Disable the use of an ImageTransportSurface. This means the GPU process // will present the rendered page rather than the browser process. const char kDisableImageTransportSurface[] = "disable-image-transport-surface"; // Use hardware gpu, if available, for tests. const char kUseGpuInTests[] = "use-gpu-in-tests"; // Disables GPU hardware acceleration. If software renderer is not in place, // then the GPU process won't launch. const char kDisableGpu[] = "disable-gpu"; // Disable the thread that crashes the GPU process if it stops responding to // messages. const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; // Prevent Java from running. const char kDisableJava[] = "disable-java"; // Don't execute JavaScript (browser JS like the new tab page still runs). const char kDisableJavaScript[] = "disable-javascript"; // Disable JavaScript I18N API. const char kDisableJavaScriptI18NAPI[] = "disable-javascript-i18n-api"; // Disable LocalStorage. const char kDisableLocalStorage[] = "disable-local-storage"; // Force logging to be disabled. Logging is enabled by default in debug // builds. const char kDisableLogging[] = "disable-logging"; // Prevent plugins from running. const char kDisablePlugins[] = "disable-plugins"; // Disables remote web font support. SVG font should always work whether this // option is specified or not. const char kDisableRemoteFonts[] = "disable-remote-fonts"; // Turns off the accessibility in the renderer. const char kDisableRendererAccessibility[] = "disable-renderer-accessibility"; // Disable False Start in SSL and TLS connections. const char kDisableSSLFalseStart[] = "disable-ssl-false-start"; // Disable smooth scrolling for testing. const char kDisableSmoothScrolling[] = "disable-smooth-scrolling"; // Disable the seccomp sandbox (Linux only) const char kDisableSeccompSandbox[] = "disable-seccomp-sandbox"; // Disable the seccomp filter sandbox (Linux only) const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox"; // Disable session storage. const char kDisableSessionStorage[] = "disable-session-storage"; // Enable shared workers. Functionality not yet complete. const char kDisableSharedWorkers[] = "disable-shared-workers"; // Disables site-specific tailoring to compatibility issues in WebKit. const char kDisableSiteSpecificQuirks[] = "disable-site-specific-quirks"; // Disables speech input. const char kDisableSpeechInput[] = "disable-speech-input"; // Specifies the request key for the continuous speech recognition webservice. const char kSpeechRecognitionWebserviceKey[] = "speech-service-key"; #if defined(OS_ANDROID) // Enable web audio API. const char kEnableWebAudio[] = "enable-webaudio"; // WebRTC is enabled by default on Android. const char kDisableWebRTC[] = "disable-webrtc"; #else // Disable web audio API. const char kDisableWebAudio[] = "disable-webaudio"; #endif // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[] = "disable-web-security"; // Disable Web Sockets support. const char kDisableWebSockets[] = "disable-web-sockets"; // Disables WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS. const char kDisableXSSAuditor[] = "disable-xss-auditor"; // Specifies if the |DOMAutomationController| needs to be bound in the // renderer. This binding happens on per-frame basis and hence can potentially // be a performance bottleneck. One should only enable it when automating dom // based tests. Also enables sending/receiving renderer automation messages // through the |AutomationRenderViewHelper|. // // TODO(kkania): Rename this to enable-renderer-automation after moving the // |DOMAutomationController| to the |AutomationRenderViewHelper|. const char kDomAutomationController[] = "dom-automation"; // Loosen security. Needed for tests using some of the functionality of // |DOMAutomationController|. const char kReduceSecurityForDomAutomationTests[] = "reduce-security-for-dom-automation-tests"; // Enable hardware accelerated page painting. const char kEnableAcceleratedPainting[] = "enable-accelerated-painting"; // Enable gpu-accelerated SVG/W3C filters. const char kEnableAcceleratedFilters[] = "enable-accelerated-filters"; // Turns on extremely verbose logging of accessibility events. const char kEnableAccessibilityLogging[] = "enable-accessibility-logging"; // Enables browser plugin compositing experiment. const char kDisableBrowserPluginCompositing[] = "disable-browser-plugin-compositing"; // Enables browser plugin for all types of pages. const char kEnableBrowserPluginForAllViewTypes[] = "enable-browser-plugin-for-all-view-types"; // Enable/Disable the creation of compositing layers for fixed position // elements. Three options are needed to support four possible scenarios: // 1. Default (disabled) // 2. Enabled always (to allow dogfooding) // 3. Disabled always (to give safety fallback for users) // 4. Enabled only if we detect a highDPI display // // Option #4 may soon be the default, because the feature is needed soon for // high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will // override Option #4. const char kEnableCompositingForFixedPosition[] = "enable-fixed-position-compositing"; const char kDisableCompositingForFixedPosition[] = "disable-fixed-position-compositing"; const char kEnableHighDpiCompositingForFixedPosition[] = "enable-high-dpi-fixed-position-compositing"; // Enables CSS3 custom filters const char kEnableCssShaders[] = "enable-css-shaders"; // Enables delegated renderer. const char kEnableDelegatedRenderer[] = "enable-delegated-renderer"; // Enables device motion events. const char kEnableDeviceMotion[] = "enable-device-motion"; // Enables restarting interrupted downloads. const char kEnableDownloadResumption[] = "enable-download-resumption"; // Enables WebKit features that are in development. const char kEnableExperimentalWebKitFeatures[] = "enable-experimental-webkit-features"; // Disables the threaded HTML parser in WebKit const char kDisableThreadedHTMLParser[] = "disable-threaded-html-parser"; // Enables the fastback page cache. const char kEnableFastback[] = "enable-fastback"; // By default, a page is laid out to fill the entire width of the window. // This flag fixes the layout of the page to a default of 980 CSS pixels, // or to a specified width and height using --enable-fixed-layout=w,h const char kEnableFixedLayout[] = "enable-fixed-layout"; // Disable the JavaScript Full Screen API. const char kDisableFullScreen[] = "disable-fullscreen"; // Enable Text Service Framework(TSF) for text inputting instead of IMM32. This // flag is ignored on Metro environment. const char kEnableTextServicesFramework[] = "enable-text-services-framework"; // Enable Gesture Tap Highlight const char kEnableGestureTapHighlight[] = "enable-gesture-tap-highlight"; const char kDisableGestureTapHighlight[] = "disable-gesture-tap-highlight"; // Enables the GPU benchmarking extension const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking"; // Enables TRACE for GL calls in the renderer. const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing"; // Enables the memory benchmarking extension const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking"; // Force logging to be enabled. Logging is disabled by default in release // builds. const char kEnableLogging[] = "enable-logging"; // Disable Media Source API on