Commit e4e68dbb authored by scheib@chromium.org's avatar scheib@chromium.org

Pointer lock added to about:flags and passed to WebKit runtime flags


BUG=72754


Review URL: http://codereview.chromium.org/8536003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110632 0039d316-1c4b-4281-b951-d872f2087c98
parent d2798d24
......@@ -4875,6 +4875,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_AURA_WINDOWS_DESCRIPTION" desc="Description for the flag to enable fancy translucent windows.">
Enable the "Aura" style for translucent window frames and constrained window dragging.
</message>
<message name="IDS_FLAGS_ENABLE_POINTER_LOCK_NAME" desc="Title for the flag to enable the pointer lock feature.">
Enable Pointer Lock
</message>
<message name="IDS_FLAGS_ENABLE_POINTER_LOCK_DESCRIPTION" desc="Description for the flag to enable the mouse lock feature.">
Web pages may capture the mouse pointer and remove it from the user's control. The mouse movement data is directed solely to the web application. Users can escape by pressing the 'Esc' key.
</message>
<message name="IDS_FLAGS_ENABLE_PLATFORM_APPS_NAME" desc="Title for the flag to enable platform apps.">
Enable platform apps
</message>
......
......@@ -432,6 +432,13 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableMediaSource)
},
{
"enable-pointer-lock",
IDS_FLAGS_ENABLE_POINTER_LOCK_NAME,
IDS_FLAGS_ENABLE_POINTER_LOCK_DESCRIPTION,
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnablePointerLock)
},
#if defined(USE_AURA)
{
"aura-windows",
......
......@@ -686,6 +686,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableStrictSiteIsolation,
switches::kDisableFullScreen,
switches::kEnablePepperTesting,
switches::kEnablePointerLock,
#if defined(OS_MACOSX)
// Allow this to be set when invoking the browser and relayed along.
switches::kEnableSandboxLogging,
......
......@@ -196,6 +196,9 @@ const char kEnableDeviceMotion[] = "enable-device-motion";
// Enable the JavaScript Full Screen API.
const char kDisableFullScreen[] = "disable-fullscreen";
// Enable the JavaScript Pointer Lock API.
const char kEnablePointerLock[] = "enable-pointer-lock";
// Enable the Gamepad API
const char kEnableGamepad[] = "enable-gamepad";
......
......@@ -71,6 +71,7 @@ CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];
CONTENT_EXPORT extern const char kEnableDNSCertProvenanceChecking[];
CONTENT_EXPORT extern const char kEnableDeviceMotion[];
CONTENT_EXPORT extern const char kDisableFullScreen[];
extern const char kEnablePointerLock[];
extern const char kEnableGamepad[];
extern const char kEnableGPUPlugin[];
CONTENT_EXPORT extern const char kEnableLogging[];
......
......@@ -486,6 +486,9 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
WebKit::WebRuntimeFeatures::enableFullScreenAPI(
!command_line.HasSwitch(switches::kDisableFullScreen));
WebKit::WebRuntimeFeatures::enablePointerLock(
command_line.HasSwitch(switches::kEnablePointerLock));
WebKit::WebRuntimeFeatures::enableVideoTrack(
command_line.HasSwitch(switches::kEnableVideoTrack));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment