OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/plugins/ppapi/plugin_module.h" | 5 #include "webkit/plugins/ppapi/plugin_module.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 276 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
277 return PPB_Widget_Impl::GetInterface(); | 277 return PPB_Widget_Impl::GetInterface(); |
278 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 278 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
279 return PluginInstance::GetZoomInterface(); | 279 return PluginInstance::GetZoomInterface(); |
280 | 280 |
281 #ifdef ENABLE_GPU | 281 #ifdef ENABLE_GPU |
282 // This should really refer to switches::kDisable3DAPIs. | 282 // This should really refer to switches::kDisable3DAPIs. |
283 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { | 283 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { |
284 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) | 284 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) |
285 return PPB_Graphics3D_Impl::GetInterface(); | 285 return PPB_Graphics3D_Impl::GetInterface(); |
286 if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0) | 286 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0) |
287 return PPB_Graphics3D_Impl::GetOpenGLESInterface(); | 287 return PPB_Graphics3D_Impl::GetOpenGLES2Interface(); |
288 } | 288 } |
289 #endif // ENABLE_GPU | 289 #endif // ENABLE_GPU |
290 | 290 |
291 // Only support the testing interface when the command line switch is | 291 // Only support the testing interface when the command line switch is |
292 // specified. This allows us to prevent people from (ab)using this interface | 292 // specified. This allows us to prevent people from (ab)using this interface |
293 // in production code. | 293 // in production code. |
294 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { | 294 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { |
295 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) | 295 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) |
296 return &testing_interface; | 296 return &testing_interface; |
297 } | 297 } |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 if (retval != 0) { | 505 if (retval != 0) { |
506 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 506 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
507 return false; | 507 return false; |
508 } | 508 } |
509 return true; | 509 return true; |
510 } | 510 } |
511 | 511 |
512 } // namespace ppapi | 512 } // namespace ppapi |
513 } // namespace webkit | 513 } // namespace webkit |
514 | 514 |
OLD | NEW |