summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 02:12:33 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 02:12:33 +0000
commit97123dc83d4d3f95ab6e01ee78f26b571b51b26b (patch)
tree858eca1238dce4800b88e027d2687d894e67219e /webkit
parent11f97e3a25fa1b4b25441ff07c4a5c4ecca5827e (diff)
downloadchromium_src-97123dc83d4d3f95ab6e01ee78f26b571b51b26b.zip
chromium_src-97123dc83d4d3f95ab6e01ee78f26b571b51b26b.tar.gz
chromium_src-97123dc83d4d3f95ab6e01ee78f26b571b51b26b.tar.bz2
(Re-landing http://codereview.chromium.org/5991003 after Chromium OS
build fix to browser_render_process_host.cc) Added group policy for disabling all client-side 3D APIs in Chromium (in particular, WebGL and Pepper 3D). This has been hooked up through a new command-line argument (--disable-3d-apis) orthogonal to the existing ones, so that further changes to those command line arguments will not accidentally regress the group policy support. Tested in the following ways: - Verified that --disable-3d-apis disables WebGL and Pepper 3D support on Mac OS X. - Verified that specifying the Disable3DAPIs policy via a JSON file disables WebGL on Linux. - Ran unit_tests and verified that there were no failures introduced. BUG=64806 TEST=ConfigurationPolicyPrefStoreBooleanTest Review URL: http://codereview.chromium.org/6045003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 186df13..82ead74 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -279,10 +279,13 @@ const void* GetInterface(const char* name) {
return PluginInstance::GetZoomInterface();
#ifdef ENABLE_GPU
- if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0)
- return PPB_Graphics3D_Impl::GetInterface();
- if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0)
- return PPB_Graphics3D_Impl::GetOpenGLESInterface();
+ // This should really refer to switches::kDisable3DAPIs.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) {
+ if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0)
+ return PPB_Graphics3D_Impl::GetInterface();
+ if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0)
+ return PPB_Graphics3D_Impl::GetOpenGLESInterface();
+ }
#endif // ENABLE_GPU
// Only support the testing interface when the command line switch is