| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "ppapi/c/dev/ppb_buffer_dev.h" | 15 #include "ppapi/c/dev/ppb_buffer_dev.h" |
| 16 #include "ppapi/c/dev/ppb_char_set_dev.h" | 16 #include "ppapi/c/dev/ppb_char_set_dev.h" |
| 17 #include "ppapi/c/dev/ppb_context_3d_dev.h" | 17 #include "ppapi/c/dev/ppb_context_3d_dev.h" |
| 18 #include "ppapi/c/dev/ppb_context_3d_trusted_dev.h" |
| 18 #include "ppapi/c/dev/ppb_cursor_control_dev.h" | 19 #include "ppapi/c/dev/ppb_cursor_control_dev.h" |
| 19 #include "ppapi/c/dev/ppb_directory_reader_dev.h" | 20 #include "ppapi/c/dev/ppb_directory_reader_dev.h" |
| 20 #include "ppapi/c/dev/ppb_file_io_dev.h" | 21 #include "ppapi/c/dev/ppb_file_io_dev.h" |
| 21 #include "ppapi/c/dev/ppb_file_io_trusted_dev.h" | 22 #include "ppapi/c/dev/ppb_file_io_trusted_dev.h" |
| 22 #include "ppapi/c/dev/ppb_file_system_dev.h" | 23 #include "ppapi/c/dev/ppb_file_system_dev.h" |
| 23 #include "ppapi/c/dev/ppb_find_dev.h" | 24 #include "ppapi/c/dev/ppb_find_dev.h" |
| 24 #include "ppapi/c/dev/ppb_font_dev.h" | 25 #include "ppapi/c/dev/ppb_font_dev.h" |
| 25 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 26 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
| 26 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" | 27 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" |
| 27 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" | 28 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 281 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
| 281 return PluginInstance::GetZoomInterface(); | 282 return PluginInstance::GetZoomInterface(); |
| 282 | 283 |
| 283 #ifdef ENABLE_GPU | 284 #ifdef ENABLE_GPU |
| 284 // This should really refer to switches::kDisable3DAPIs. | 285 // This should really refer to switches::kDisable3DAPIs. |
| 285 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { | 286 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { |
| 286 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) | 287 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) |
| 287 return PPB_Graphics3D_Impl::GetInterface(); | 288 return PPB_Graphics3D_Impl::GetInterface(); |
| 288 if (strcmp(name, PPB_CONTEXT_3D_DEV_INTERFACE) == 0) | 289 if (strcmp(name, PPB_CONTEXT_3D_DEV_INTERFACE) == 0) |
| 289 return PPB_Context3D_Impl::GetInterface(); | 290 return PPB_Context3D_Impl::GetInterface(); |
| 291 if (strcmp(name, PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE) == 0) |
| 292 return PPB_Context3D_Impl::GetTrustedInterface(); |
| 290 if (strcmp(name, PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == 0) | 293 if (strcmp(name, PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == 0) |
| 291 return PPB_GLESChromiumTextureMapping_Impl::GetInterface(); | 294 return PPB_GLESChromiumTextureMapping_Impl::GetInterface(); |
| 292 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0) | 295 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0) |
| 293 return PPB_OpenGLES_Impl::GetInterface(); | 296 return PPB_OpenGLES_Impl::GetInterface(); |
| 294 if (strcmp(name, PPB_SURFACE_3D_DEV_INTERFACE) == 0) | 297 if (strcmp(name, PPB_SURFACE_3D_DEV_INTERFACE) == 0) |
| 295 return PPB_Surface3D_Impl::GetInterface(); | 298 return PPB_Surface3D_Impl::GetInterface(); |
| 296 } | 299 } |
| 297 #endif // ENABLE_GPU | 300 #endif // ENABLE_GPU |
| 298 | 301 |
| 299 #ifdef ENABLE_FLAPPER_HACKS | 302 #ifdef ENABLE_FLAPPER_HACKS |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 if (retval != 0) { | 472 if (retval != 0) { |
| 470 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 473 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 471 return false; | 474 return false; |
| 472 } | 475 } |
| 473 return true; | 476 return true; |
| 474 } | 477 } |
| 475 | 478 |
| 476 } // namespace ppapi | 479 } // namespace ppapi |
| 477 } // namespace webkit | 480 } // namespace webkit |
| 478 | 481 |
| OLD | NEW |