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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) | 269 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) |
270 return PPB_VideoDecoder_Impl::GetInterface(); | 270 return PPB_VideoDecoder_Impl::GetInterface(); |
271 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 271 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
272 return PPB_Widget_Impl::GetInterface(); | 272 return PPB_Widget_Impl::GetInterface(); |
273 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 273 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
274 return PluginInstance::GetZoomInterface(); | 274 return PluginInstance::GetZoomInterface(); |
275 | 275 |
276 #ifdef ENABLE_GPU | 276 #ifdef ENABLE_GPU |
277 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) | 277 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) |
278 return PPB_Graphics3D_Impl::GetInterface(); | 278 return PPB_Graphics3D_Impl::GetInterface(); |
279 if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0) | 279 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0) |
280 return PPB_Graphics3D_Impl::GetOpenGLESInterface(); | 280 return PPB_Graphics3D_Impl::GetOpenGLES2Interface(); |
281 #endif // ENABLE_GPU | 281 #endif // ENABLE_GPU |
282 | 282 |
283 // Only support the testing interface when the command line switch is | 283 // Only support the testing interface when the command line switch is |
284 // specified. This allows us to prevent people from (ab)using this interface | 284 // specified. This allows us to prevent people from (ab)using this interface |
285 // in production code. | 285 // in production code. |
286 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { | 286 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { |
287 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) | 287 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) |
288 return &testing_interface; | 288 return &testing_interface; |
289 } | 289 } |
290 return NULL; | 290 return NULL; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 if (retval != 0) { | 489 if (retval != 0) { |
490 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 490 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
491 return false; | 491 return false; |
492 } | 492 } |
493 return true; | 493 return true; |
494 } | 494 } |
495 | 495 |
496 } // namespace ppapi | 496 } // namespace ppapi |
497 } // namespace webkit | 497 } // namespace webkit |
498 | 498 |
OLD | NEW |