content_switches.cc revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/common/content_switches.h"
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace switches {
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// By default, file:// URIs cannot read other file:// URIs. This is an
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// override for developers who need the old behavior for testing.
112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kAllowFileAccessFromFiles[]      = "allow-file-access-from-files";
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Allows debugging of sandboxed processes (see zygote_main_linux.cc).
142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kAllowSandboxDebugging[]         = "allow-sandbox-debugging";
15868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Allow compositing on chrome:// pages.
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kAllowWebUICompositing[]         = "allow-webui-compositing";
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enumerates and prints a child process' most dangerous handles when it
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// is terminated.
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kAuditHandles[]                  = "enable-handle-auditing";
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// The same as kAuditHandles except all handles are enumerated.
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kAuditAllHandles[]               = "enable-handle-auditing-all";
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Causes the browser process to throw an assertion on startup.
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kBrowserAssertTest[]             = "assert-test";
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Causes the browser process to crash on startup.
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kBrowserCrashTest[]              = "crash-test";
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Path to the exe to run for the renderer and plugin subprocesses.
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kBrowserSubprocessPath[]         = "browser-subprocess-path";
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This is controlled by policy and is kept separate from the other
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// enable/disable switches to avoid accidentally regressing the policy
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// support for controlling access to these APIs.
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisable3DAPIs[]                 = "disable-3d-apis";
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable gpu-accelerated 2d canvas.
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAccelerated2dCanvas[]    = "disable-accelerated-2d-canvas";
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable antialiasing on 2d canvas.
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisable2dCanvasAntialiasing[]   = "disable-canvas-aa";
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable experimental canvas features, e.g. canvas 2D context attributes
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableExperimentalCanvasFeatures[]
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                        = "enable-experimental-canvas-features";
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables accelerated compositing.
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAcceleratedCompositing[] = "disable-accelerated-compositing";
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables the hardware acceleration of 3D CSS and animation.
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAcceleratedLayers[]      = "disable-accelerated-layers";
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables the hardware acceleration of plugins.
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAcceleratedPlugins[]     = "disable-accelerated-plugins";
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables GPU accelerated video display.
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAcceleratedVideo[]       = "disable-accelerated-video";
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables the alternate window station for the renderer.
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAltWinstation[]          = "disable-winsta";
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the ApplicationCache.
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableApplicationCache[]       = "disable-application-cache";
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(scherkus): remove --disable-audio when we have a proper fallback
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// mechanism.
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAudio[]                  = "disable-audio";
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable limits on the number of backing stores. Can prevent blinking for
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// users with many windows/tabs and lots of memory.
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableBackingStoreLimit[]      = "disable-backing-store-limit";
765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables HTML5 DB support.
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableDatabases[]              = "disable-databases";
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables desktop notifications (default enabled on windows).
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableDesktopNotifications[]   = "disable-desktop-notifications";
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables device orientation events.
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableDeviceOrientation[]      = "disable-device-orientation";
855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_ANDROID)
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// WebGL is disabled by default on Android.
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableExperimentalWebGL[]       = "enable-webgl";
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable experimental WebGL support.
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableExperimentalWebGL[]      = "disable-webgl";
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Blacklist the GPU for accelerated compositing.
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kBlacklistAcceleratedCompositing[] =
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "blacklist-accelerated-compositing";
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Blacklist the GPU for WebGL.
995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kBlacklistWebGL[]                = "blacklist-webgl";
1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable FileSystem API.
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableFileSystem[]             = "disable-file-system";
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable 3D inside of flapper.
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableFlash3d[]                = "disable-flash-3d";
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable using 3D to present fullscreen flash
1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableFlashFullscreen3d[]      = "disable-flash-fullscreen-3d";
1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable Stage3D inside of flapper.
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableFlashStage3d[]           = "disable-flash-stage3d";
1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Suppresses support for the Geolocation javascript API.
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGeolocation[]            = "disable-geolocation";
1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable GL multisampling.
1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGLMultisampling[]        = "disable-gl-multisampling";
1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Do not launch the GPU process shortly after browser process launch. Instead
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// launch it when it is first needed.
1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGpuProcessPrelaunch[]    = "disable-gpu-process-prelaunch";
1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the GPU process sandbox.
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGpuSandbox[]             = "disable-gpu-sandbox";
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Reduces the GPU process sandbox to be less strict.
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kReduceGpuSandbox[]              = "reduce-gpu-sandbox";
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable the GPU process sandbox (Linux/Chrome OS only for now).
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableGpuSandbox[]              = "enable-gpu-sandbox";
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Suppresses hang monitor dialogs in renderer processes.  This may allow slow
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// unload handlers on a page to prevent the tab from closing, but the Task
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Manager can be used to terminate the offending process in this case.
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableHangMonitor[]            = "disable-hang-monitor";
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables HTML-based desktop notifications.
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableHTMLNotifications[]      = "disable-html-notifications";
1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the RenderThread's HistogramCustomizer.
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableHistogramCustomizer[]    = "disable-histogram-customizer";
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the use of an ImageTransportSurface. This means the GPU process
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// will present the rendered page rather than the browser process.
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableImageTransportSurface[]  = "disable-image-transport-surface";
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use hardware gpu, if available, for tests.
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kUseGpuInTests[]                 = "use-gpu-in-tests";
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables GPU hardware acceleration.  If software renderer is not in place,
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// then the GPU process won't launch.
1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGpu[]                    = "disable-gpu";
1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the thread that crashes the GPU process if it stops responding to
1555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// messages.
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGpuWatchdog[]            = "disable-gpu-watchdog";
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Prevent Java from running.
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableJava[]                   = "disable-java";
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Don't execute JavaScript (browser JS like the new tab page still runs).
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableJavaScript[]             = "disable-javascript";
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable JavaScript I18N API.
1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableJavaScriptI18NAPI[]      = "disable-javascript-i18n-api";
1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable LocalStorage.
1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableLocalStorage[]           = "disable-local-storage";
1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Force logging to be disabled.  Logging is enabled by default in debug
1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// builds.
1725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableLogging[]                = "disable-logging";
1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Prevent plugins from running.
1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisablePlugins[]                = "disable-plugins";
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables remote web font support. SVG font should always work whether this
1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// option is specified or not.
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableRemoteFonts[]            = "disable-remote-fonts";
1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Turns off the accessibility in the renderer.
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableRendererAccessibility[]  = "disable-renderer-accessibility";
1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable False Start in SSL and TLS connections.
1855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSSLFalseStart[]          = "disable-ssl-false-start";
1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable smooth scrolling for testing.
1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSmoothScrolling[]        = "disable-smooth-scrolling";
1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the seccomp filter sandbox (seccomp-bpf) (Linux only).
1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSeccompFilterSandbox[]   = "disable-seccomp-filter-sandbox";
1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable session storage.
1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSessionStorage[]         = "disable-session-storage";
1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable shared workers. Functionality not yet complete.
1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSharedWorkers[]          = "disable-shared-workers";
1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables site-specific tailoring to compatibility issues in WebKit.
2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSiteSpecificQuirks[]     = "disable-site-specific-quirks";
2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables speech input.
2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableSpeechInput[]            = "disable-speech-input";
2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Specifies the request key for the continuous speech recognition webservice.
2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kSpeechRecognitionWebserviceKey[] = "speech-service-key";
2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables web speech synthesis api.
2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableSpeechSynthesis[]            = "enable-speech-synthesis";
2105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_ANDROID)
2125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable web audio API.
2135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableWebAudio[]                = "enable-webaudio";
2145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// WebRTC is enabled by default on Android.
2165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableWebRTC[]                 = "disable-webrtc";
2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable web audio API.
2195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableWebAudio[]               = "disable-webaudio";
2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
2215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables Web MIDI API.
2235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableWebMIDI[]                 = "enable-web-midi";
2245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Don't enforce the same-origin policy. (Used by people testing their sites.)
2265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableWebSecurity[]            = "disable-web-security";
2275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable an experimental WebSocket implementation.
2295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableExperimentalWebSocket[] = "enable-experimental-websocket";
2305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS.
2325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableXSSAuditor[]             = "disable-xss-auditor";
2335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Specifies if the |DOMAutomationController| needs to be bound in the
2355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// renderer. This binding happens on per-frame basis and hence can potentially
2365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// be a performance bottleneck. One should only enable it when automating dom
2375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// based tests. Also enables sending/receiving renderer automation messages
2385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// through the |AutomationRenderViewHelper|.
2395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
2405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(kkania): Rename this to enable-renderer-automation after moving the
2415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |DOMAutomationController| to the |AutomationRenderViewHelper|.
2425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDomAutomationController[]       = "dom-automation";
2435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Loosen security. Needed for tests using some of the functionality of
2455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |DOMAutomationController|.
2465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kReduceSecurityForDomAutomationTests[] =
2475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "reduce-security-for-dom-automation-tests";
2485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable hardware accelerated page painting.
2505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableAcceleratedPainting[]     = "enable-accelerated-painting";
2515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable gpu-accelerated SVG/W3C filters.
2535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableAcceleratedFilters[]      = "enable-accelerated-filters";
2545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Turns on extremely verbose logging of accessibility events.
2565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableAccessibilityLogging[]    = "enable-accessibility-logging";
2575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable notifications of audible/silent audio output from a render view.
2595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
2605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(miu): Remove --enable-audible-notifications once the feature goes
2615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// live.  http://crbug.com/178934
2625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableAudibleNotifications[]   = "enable-audible-notifications";
2635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables browser plugin compositing experiment.
2655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableBrowserPluginCompositing[] =
2665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "disable-browser-plugin-compositing";
2675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables browser plugin for all types of pages.
2695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableBrowserPluginForAllViewTypes[] =
2705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "enable-browser-plugin-for-all-view-types";
2715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables Drag and Drop into and out of Browser Plugin.
2735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// kEnableBrowserPluginGuestViews must also be set at this time.
2745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableBrowserPluginDragDrop[]   = "enable-browser-plugin-drag-drop";
2755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable/Disable the creation of compositing layers for fixed position
2775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// elements. Three options are needed to support four possible scenarios:
2785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//  1. Default (disabled)
2795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//  2. Enabled always (to allow dogfooding)
2805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//  3. Disabled always (to give safety fallback for users)
2815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//  4. Enabled only if we detect a highDPI display
2825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
2835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Option #4 may soon be the default, because the feature is needed soon for
2845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will
2855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// override Option #4.
2865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableCompositingForFixedPosition[] =
2875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)     "enable-fixed-position-compositing";
2885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableCompositingForFixedPosition[] =
2895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)     "disable-fixed-position-compositing";
2905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableHighDpiCompositingForFixedPosition[] =
2915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)     "enable-high-dpi-fixed-position-compositing";
2925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables CSS3 custom filters
2945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableCssShaders[]              = "enable-css-shaders";
2955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables delegated renderer.
2975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableDelegatedRenderer[]       = "enable-delegated-renderer";
2985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables device motion events.
3005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableDeviceMotion[]            = "enable-device-motion";
3015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables restarting interrupted downloads.
3035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableDownloadResumption[]      = "enable-download-resumption";
3045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables WebKit features that are in development.
3065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableExperimentalWebKitFeatures[] =
3075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "enable-experimental-webkit-features";
3085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables the threaded HTML parser in WebKit
3105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableThreadedHTMLParser[]     = "disable-threaded-html-parser";
3115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// By default, a page is laid out to fill the entire width of the window.
3135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This flag fixes the layout of the page to a default of 980 CSS pixels,
3145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// or to a specified width and height using --enable-fixed-layout=w,h
3155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableFixedLayout[]             = "enable-fixed-layout";
3165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable the JavaScript Full Screen API.
3185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableFullScreen[]             = "disable-fullscreen";
3195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable Text Service Framework(TSF) for text inputting instead of IMM32. This
3215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// flag is ignored on Metro environment.
3225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableTextServicesFramework[] = "enable-text-services-framework";
3235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable Gesture Tap Highlight
3255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableGestureTapHighlight[]    = "enable-gesture-tap-highlight";
3265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableGestureTapHighlight[]   = "disable-gesture-tap-highlight";
3275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables the GPU benchmarking extension
3295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableGpuBenchmarking[]         = "enable-gpu-benchmarking";
3305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables TRACE for GL calls in the renderer.
3325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableGpuClientTracing[]        = "enable-gpu-client-tracing";
3335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables the memory benchmarking extension
3355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableMemoryBenchmarking[]      = "enable-memory-benchmarking";
3365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Force logging to be enabled.  Logging is disabled by default in release
3385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// builds.
3395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableLogging[]                 = "enable-logging";
3405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable Media Source API on <audio>/<video> elements.
3425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableMediaSource[]             = "disable-media-source";
3435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use fake device for MediaStream to replace actual camera and microphone.
3455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream";
3465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// On Windows, converts the page to the currently-installed monitor profile.
3485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This does NOT enable color management for images. The source is still
3495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// assumed to be sRGB.
3505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableMonitorProfile[]          = "enable-monitor-profile";
3515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables compositor-accelerated touch-screen pinch gestures.
3535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnablePinch[]                   = "enable-pinch";
3545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisablePinch[]                  = "disable-pinch";
3555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables use of cache if offline, even if it's stale
3575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableOfflineCacheAccess[]      = "enable-offline-cache-access";
3585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable caching of pre-parsed JS script data.  See http://crbug.com/32407.
3605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnablePreparsedJsCaching[]      = "enable-preparsed-js-caching";
3615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable privileged WebGL extensions; without this switch such extensions are
3635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// available only to Chrome extensions.
3645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnablePrivilegedWebGLExtensions[] =
3655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "enable-privileged-webgl-extensions";
3665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Aggressively free GPU command buffers belonging to hidden tabs.
3685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnablePruneGpuCommandBuffers[] =
3695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "enable-prune-gpu-command-buffers";
3705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable screen capturing support for MediaStream API.
3725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableUserMediaScreenCapturing[] =
3735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "enable-usermedia-screen-capturing";
3745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables TLS cached info extension.
3765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableSSLCachedInfo[]  = "enable-ssl-cached-info";
3775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Cause the OS X sandbox write to syslog every time an access to a resource
3795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// is denied by the sandbox.
3805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableSandboxLogging[]          = "enable-sandbox-logging";
3815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable spatial navigation
3835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableSpatialNavigation[]       = "enable-spatial-navigation";
3845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// On platforms that support it, enables smooth scroll animation.
3865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableSmoothScrolling[]         = "enable-smooth-scrolling";
3875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enables StatsTable, logging statistics to a global named shared memory table.
3895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableStatsTable[]              = "enable-stats-table";
3905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Experimentally ensures that each renderer process:
3925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 1) Only handles rendering for pages from a single site, apart from iframes.
3935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (Note that a page can reference content from multiple origins due to images,
3945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// JavaScript files, etc.  Cross-site iframes are also loaded in-process.)
3955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 2) Only has authority to see or use cookies for the page's top-level origin.
3965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (So if a.com iframes b.com, the b.com network request will be sent without
3975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// cookies.)
3985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This is expected to break compatibility with many pages for now.  Unlike the
3995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// --site-per-process flag, this allows cross-site iframes, but it blocks all
4005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// cookies on cross-site requests.
4015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableStrictSiteIsolation[]     = "enable-strict-site-isolation";
4025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable multithreaded GPU compositing of web content.
4045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableThreadedCompositing[]     = "enable-threaded-compositing";
4055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Allow GL contexts to be automatically virtualized (shared between command
4075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// buffer clients) if they are compatible.
4085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableVirtualGLContexts[]       = "enable-virtual-gl-contexts";
4095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable multithreaded GPU compositing of web content.
4115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableThreadedCompositing[]     = "disable-threaded-compositing";
4125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable use of experimental TCP sockets API for sending data in the
4145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// SYN packet.
4155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableTcpFastOpen[]             = "enable-tcp-fastopen";
4165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disables hardware acceleration of video decode, where available.
4185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableAcceleratedVideoDecode[] =
419    "disable-accelerated-video-decode";
420
421// Enables the use of the viewport meta tag, which allows
422// pages to control aspects of their own layout. This also turns on touch-screen
423// pinch gestures.
424const char kEnableViewport[]                = "enable-viewport";
425
426// Enables experimental features for the geolocation API.
427// Current features:
428// - CoreLocation support for Mac OS X 10.6
429// - Gateway location for Linux and Windows
430// - Location platform support for Windows 7
431const char kExperimentalLocationFeatures[]  = "experimental-location-features";
432
433// Load NPAPI plugins from the specified directory.
434const char kExtraPluginDir[]                = "extra-plugin-dir";
435
436// If accelerated compositing is supported, always enter compositing mode for
437// the base layer even when compositing is not strictly required.
438const char kForceCompositingMode[]          = "force-compositing-mode";
439
440// This flag disables force compositing mode and prevents it from being enabled
441// via field trials.
442const char kDisableForceCompositingMode[]   = "disable-force-compositing-mode";
443
444// Enable the synchronous renderer compositor API. See
445// ContentRendererClient::DidCreateSynchronousCompositor()
446const char kEnableSynchronousRendererCompositor[] =
447    "enable-synchronous-renderer-compositor";
448
449// Some field trials may be randomized in the browser, and the randomly selected
450// outcome needs to be propagated to the renderer. For instance, this is used
451// to modify histograms recorded in the renderer, or to get the renderer to
452// also set of its state (initialize, or not initialize components) to match the
453// experiment(s). The option is also useful for forcing field trials when
454// testing changes locally. The argument is a list of name and value pairs,
455// separated by slashes. See FieldTrialList::CreateTrialsFromString() in
456// field_trial.h for details.
457const char kForceFieldTrials[]              = "force-fieldtrials";
458
459// Force renderer accessibility to be on instead of enabling it on demand when
460// a screen reader is detected. The disable-renderer-accessibility switch
461// overrides this if present.
462const char kForceRendererAccessibility[]    = "force-renderer-accessibility";
463
464// Force the compositor to use its software implementation instead of GL.
465const char kEnableSoftwareCompositingGLAdapter[] =
466    "enable-software-compositing-gl-adapter";
467
468// Passes gpu device_id from browser process to GPU process.
469const char kGpuDeviceID[]                   = "gpu-device-id";
470
471// Passes gpu driver_vendor from browser process to GPU process.
472const char kGpuDriverVendor[]               = "gpu-driver-vendor";
473
474// Passes gpu driver_version from browser process to GPU process.
475const char kGpuDriverVersion[]              = "gpu-driver-version";
476
477// Extra command line options for launching the GPU process (normally used
478// for debugging). Use like renderer-cmd-prefix.
479const char kGpuLauncher[]                   = "gpu-launcher";
480
481// Makes this process a GPU sub-process.
482const char kGpuProcess[]                    = "gpu-process";
483
484// Causes the GPU process to display a dialog on launch.
485const char kGpuStartupDialog[]              = "gpu-startup-dialog";
486
487// Passes gpu vendor_id from browser process to GPU process.
488const char kGpuVendorID[]                   = "gpu-vendor-id";
489
490// These mappings only apply to the host resolver.
491const char kHostResolverRules[]             = "host-resolver-rules";
492
493// Ignores certificate-related errors.
494const char kIgnoreCertificateErrors[]       = "ignore-certificate-errors";
495
496// Ignores GPU blacklist.
497const char kIgnoreGpuBlacklist[]            = "ignore-gpu-blacklist";
498
499// Run the GPU process as a thread in the browser process.
500const char kInProcessGPU[]                  = "in-process-gpu";
501
502// Runs plugins inside the renderer process
503const char kInProcessPlugins[]              = "in-process-plugins";
504
505// Specifies the flags passed to JS engine
506const char kJavaScriptFlags[]               = "js-flags";
507
508// Load an NPAPI plugin from the specified path.
509const char kLoadPlugin[]                    = "load-plugin";
510
511// Sets the minimum log level. Valid values are from 0 to 3:
512// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
513const char kLoggingLevel[]                  = "log-level";
514
515// Make plugin processes log their sent and received messages to VLOG(1).
516const char kLogPluginMessages[]             = "log-plugin-messages";
517
518// Sample memory usage with high frequency and store the results to the
519// Renderer.Memory histogram. Used in memory tests.
520const char kMemoryMetrics[]                 = "memory-metrics";
521
522// Don't send HTTP-Referer headers.
523const char kNoReferrers[]                   = "no-referrers";
524
525// Disables the sandbox for all process types that are normally sandboxed.
526const char kNoSandbox[]                     = "no-sandbox";
527
528// Enables the sandboxed processes to run without a job object assigned to them.
529// This flag is required to allow Chrome to run in RemoteApps or Citrix. This
530// flag can reduce the security of the sandboxed processes and allow them to do
531// certain API calls like shut down Windows or access the clipboard. Also we
532// lose the chance to kill some processes until the outer job that owns them
533// finishes.
534const char kAllowNoSandboxJob[]             = "allow-no-sandbox-job";
535
536// Specifies a command that should be used to launch the plugin process.  Useful
537// for running the plugin process through purify or quantify.  Ex:
538//   --plugin-launcher="path\to\purify /Run=yes"
539const char kPluginLauncher[]                = "plugin-launcher";
540
541// Tells the plugin process the path of the plugin to load
542const char kPluginPath[]                    = "plugin-path";
543
544// Causes the process to run as a plugin subprocess.
545const char kPluginProcess[]                 = "plugin";
546
547// Causes the plugin process to display a dialog on launch.
548const char kPluginStartupDialog[]           = "plugin-startup-dialog";
549
550// Argument to the process type that indicates a PPAPI broker process type.
551const char kPpapiBrokerProcess[]            = "ppapi-broker";
552
553// Runs PPAPI (Pepper) plugins in-process.
554const char kPpapiInProcess[]                = "ppapi-in-process";
555
556// Like kPluginLauncher for PPAPI plugins.
557const char kPpapiPluginLauncher[]           = "ppapi-plugin-launcher";
558
559// Argument to the process type that indicates a PPAPI plugin process type.
560const char kPpapiPluginProcess[]            = "ppapi";
561
562// Causes the PPAPI sub process to display a dialog on launch. Be sure to use
563// --no-sandbox as well or the sandbox won't allow the dialog to display.
564const char kPpapiStartupDialog[]            = "ppapi-startup-dialog";
565
566// Runs a single process for each site (i.e., group of pages from the same
567// registered domain) the user visits.  We default to using a renderer process
568// for each site instance (i.e., group of pages from the same registered
569// domain with script connections to each other).
570const char kProcessPerSite[]                = "process-per-site";
571
572// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
573// renderer process.  We default to using a renderer process for each
574// site instance (i.e., group of pages from the same registered domain with
575// script connections to each other).
576const char kProcessPerTab[]                 = "process-per-tab";
577
578// The value of this switch determines whether the process is started as a
579// renderer or plugin host.  If it's empty, it's the browser.
580const char kProcessType[]                   = "type";
581
582// Register Pepper plugins (see pepper_plugin_registry.cc for its format).
583const char kRegisterPepperPlugins[]         = "register-pepper-plugins";
584
585// Enables remote debug over HTTP on the specified port.
586const char kRemoteDebuggingPort[]           = "remote-debugging-port";
587
588#if defined(OS_ANDROID)
589// Enables remote debug over HTTP on the specified socket name.
590const char kRemoteDebuggingSocketName[]     = "remote-debugging-socket-name";
591#endif
592
593// Causes the renderer process to throw an assertion on launch.
594const char kRendererAssertTest[]            = "renderer-assert-test";
595
596// On POSIX only: the contents of this flag are prepended to the renderer
597// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
598const char kRendererCmdPrefix[]             = "renderer-cmd-prefix";
599
600// Causes the process to run as renderer instead of as browser.
601const char kRendererProcess[]               = "renderer";
602
603// Overrides the default/calculated limit to the number of renderer processes.
604// Very high values for this setting can lead to high memory/resource usage
605// or instability.
606const char kRendererProcessLimit[]          = "renderer-process-limit";
607
608// Causes the renderer process to display a dialog on launch.
609const char kRendererStartupDialog[]         = "renderer-startup-dialog";
610
611// Enables accelerated compositing for overflow scroll. Promotes eligible
612// overflow:scroll elements to layers to enable accelerated scrolling for them.
613const char kEnableAcceleratedOverflowScroll[] =
614    "enable-accelerated-overflow-scroll";
615
616// Disables accelerated compositing for overflow scroll.
617extern const char kDisableAcceleratedOverflowScroll[] =
618    "disable-accelerated-overflow-scroll";
619
620// Enables accelerated compositing for scrollable frames for accelerated
621// scrolling for them. Requires kForceCompositingMode.
622const char kEnableAcceleratedScrollableFrames[] =
623     "enable-accelerated-scrollable-frames";
624
625// Enables accelerated scrolling by the compositor for frames. Requires
626// kForceCompositingMode and kEnableAcceleratedScrollableFrames.
627const char kEnableCompositedScrollingForFrames[] =
628     "enable-composited-scrolling-for-frames";
629
630// Visibly render a border around paint rects in the web page to help debug
631// and study painting behavior.
632const char kShowPaintRects[]                = "show-paint-rects";
633
634// Map mouse input events into touch gesture events.  Useful for debugging touch
635// gestures without needing a touchscreen.
636const char kSimulateTouchScreenWithMouse[]  =
637    "simulate-touch-screen-with-mouse";
638
639// Runs the renderer and plugins in the same process as the browser
640const char kSingleProcess[]                 = "single-process";
641
642// Experimentally enforces a one-site-per-process security policy.
643// All cross-site navigations force process swaps, and we can restrict a
644// renderer process's access rights based on its site.  For details, see:
645// http://www.chromium.org/developers/design-documents/site-isolation
646//
647// Unlike --enable-strict-site-isolation (which allows cross-site iframes),
648// this flag blocks cross-site documents even in iframes, until out-of-process
649// iframe support is available.  Cross-site network requests do attach the
650// normal set of cookies, but a renderer process is only allowed to view or
651// modify cookies for its own site (via JavaScript).
652// TODO(irobert): Implement the cross-site document blocking in
653// http://crbug.com/159215.
654const char kSitePerProcess[]                = "site-per-process";
655
656// Skip gpu info collection, blacklist loading, and blacklist auto-update
657// scheduling at browser startup time.
658// Therefore, all GPU features are available, and about:gpu page shows empty
659// content. The switch is intended only for tests.
660const char kSkipGpuDataLoading[]            = "skip-gpu-data-loading";
661
662// GestureTapDown events are deferred by this many miillseconds before
663// sending them to the renderer.
664const char kTapDownDeferralTimeMs[]         = "tap-down-deferral-time";
665
666// Runs the security test for the renderer sandbox.
667const char kTestSandbox[]                   = "test-sandbox";
668
669// Allows for forcing socket connections to http/https to use fixed ports.
670const char kTestingFixedHttpPort[]          = "testing-fixed-http-port";
671const char kTestingFixedHttpsPort[]         = "testing-fixed-https-port";
672
673// Causes TRACE_EVENT flags to be recorded from startup. Optionally, can
674// specify the specific trace categories to include (e.g.
675// --trace-startup=base,net) otherwise, all events are recorded. Setting this
676// flag results in the first call to BeginTracing() to receive all trace events
677// since startup. In Chrome, you may find --trace-startup-file and
678// --trace-startup-duration to control the auto-saving of the trace (not
679// supported in the base-only TraceLog component).
680const char kTraceStartup[]                  = "trace-startup";
681
682// If supplied, sets the file which startup tracing will be stored into, if
683// omitted the default will be used "chrometrace.log" in the current directory.
684// Has no effect unless --trace-startup is also supplied.
685// Example: --trace-startup --trace-startup-file=/tmp/trace_event.log
686// As a special case, can be set to 'none' - this disables automatically saving
687// the result to a file and the first manually recorded trace will then receive
688// all events since startup.
689const char kTraceStartupFile[]              = "trace-startup-file";
690
691// Sets the time in seconds until startup tracing ends. If omitted a default of
692// 5 seconds is used. Has no effect without --trace-startup, or if
693// --startup-trace-file=none was supplied.
694const char kTraceStartupDuration[]          = "trace-startup-duration";
695
696// Prioritizes the UI's command stream in the GPU process
697extern const char kUIPrioritizeInGpuProcess[] =
698    "ui-prioritize-in-gpu-process";
699
700// A string used to override the default user agent with a custom one.
701const char kUserAgent[]                     = "user-agent";
702
703// On POSIX only: the contents of this flag are prepended to the utility
704// process command line. Useful values might be "valgrind" or "xterm -e gdb
705// --args".
706const char kUtilityCmdPrefix[]              = "utility-cmd-prefix";
707
708// Causes the process to run as a utility subprocess.
709const char kUtilityProcess[]                = "utility";
710
711// The utility process is sandboxed, with access to one directory. This flag
712// specifies the directory that can be accessed.
713const char kUtilityProcessAllowedDir[]      = "utility-allowed-dir";
714
715// Will add kWaitForDebugger to every child processes. If a value is passed, it
716// will be used as a filter to determine if the child process should have the
717// kWaitForDebugger flag passed on or not.
718const char kWaitForDebuggerChildren[]       = "wait-for-debugger-children";
719
720// Choose which logging channels in WebCore to activate.  See
721// Logging.cpp in WebKit's WebCore for a list of available channels.
722const char kWebCoreLogChannels[]            = "webcore-log-channels";
723
724// Causes the process to run as a worker subprocess.
725const char kWorkerProcess[]                 = "worker";
726
727// The prefix used when starting the zygote process. (i.e. 'gdb --args')
728const char kZygoteCmdPrefix[]               = "zygote-cmd-prefix";
729
730// Causes the process to run as a renderer zygote.
731const char kZygoteProcess[]                 = "zygote";
732
733// Enables moving cursor by word in visual order.
734const char kEnableVisualWordMovement[]      = "enable-visual-word-movement";
735
736// Set when Chromium should use a mobile user agent.
737const char kUseMobileUserAgent[] = "use-mobile-user-agent";
738
739#if defined(OS_ANDROID)
740// Disable history logging for media elements.
741const char kDisableMediaHistoryLogging[]    = "disable-media-history";
742
743// Disable user gesture requirement for media playback.
744const char kDisableGestureRequirementForMediaPlayback[] =
745    "disable-gesture-requirement-for-media-playback";
746
747// The telephony region (ISO country code) to use in phone number detection.
748const char kNetworkCountryIso[] = "network-country-iso";
749
750// Set to enable compatibility with legacy WebView synchronous APIs.
751const char kEnableWebViewSynchronousAPIs[] = "enable-webview-synchronous-apis";
752#endif
753
754#if defined(OS_CHROMEOS)
755// Disables panel fitting (used for mirror mode).
756const char kDisablePanelFitting[]           = "disable-panel-fitting";
757#endif
758
759#if defined(OS_POSIX)
760// Causes the child processes to cleanly exit via calling exit().
761const char kChildCleanExit[]                = "child-clean-exit";
762#endif
763
764#if defined(OS_MACOSX) && !defined(OS_IOS)
765const char kDisableCarbonInterposing[]      = "disable-carbon-interposing";
766#endif
767
768// Disables the use of a 3D software rasterizer.
769const char kDisableSoftwareRasterizer[]     = "disable-software-rasterizer";
770
771#if defined(USE_AURA)
772// Forces usage of the test compositor. Needed to run ui tests on bots.
773extern const char kTestCompositor[]         = "test-compositor";
774#endif
775
776// Sets the tile size used by composited layers.
777const char kDefaultTileWidth[]              = "default-tile-width";
778const char kDefaultTileHeight[]             = "default-tile-height";
779
780// Sets the width and height above which a composited layer will get tiled.
781const char kMaxUntiledLayerWidth[]          = "max-untiled-layer-width";
782const char kMaxUntiledLayerHeight[]         = "max-untiled-layer-height";
783
784// Use ExynosVideoDecodeAccelerator for video decode (instead of SECOMX)
785const char kUseExynosVda[]                  = "use-exynos-vda";
786
787const char kEnableFixedPositionCreatesStackingContext[]
788    = "enable-fixed-position-creates-stacking-context";
789const char kDisableFixedPositionCreatesStackingContext[]
790    = "disable-fixed-position-creates-stacking-context";
791
792// Defer image decoding in WebKit until painting.
793const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
794
795// Use a vsync signal from the browser to the renderer to schedule rendering.
796const char kEnableVsyncNotification[] = "enable-vsync-notification";
797
798// Enables or disables history navigation in response to horizontal overscroll.
799// Set the value to '1' to enable the feature, and set to '0' to disable.
800// Defaults to enabled.
801const char kOverscrollHistoryNavigation[] =
802    "overscroll-history-navigation";
803
804// Enables 'image/webp' accept header for image requests.
805const char kEnableWebPInAcceptHeader[] = "enable-webp-in-accept-header";
806
807}  // namespace switches
808