Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 5991003: Added group policy for disabling all client-side 3D APIs in Chromium... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/worker/worker_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_module.cc
===================================================================
--- webkit/plugins/ppapi/plugin_module.cc (revision 69586)
+++ webkit/plugins/ppapi/plugin_module.cc (working copy)
@@ -278,10 +278,13 @@
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
« no previous file with comments | « chrome/worker/worker_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698