| 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" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "ppapi/c/dev/ppb_widget_dev.h" | 43 #include "ppapi/c/dev/ppb_widget_dev.h" |
| 44 #include "ppapi/c/dev/ppb_zoom_dev.h" | 44 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 45 #include "ppapi/c/pp_module.h" | 45 #include "ppapi/c/pp_module.h" |
| 46 #include "ppapi/c/pp_resource.h" | 46 #include "ppapi/c/pp_resource.h" |
| 47 #include "ppapi/c/pp_var.h" | 47 #include "ppapi/c/pp_var.h" |
| 48 #include "ppapi/c/ppb_audio.h" | 48 #include "ppapi/c/ppb_audio.h" |
| 49 #include "ppapi/c/ppb_audio_config.h" | 49 #include "ppapi/c/ppb_audio_config.h" |
| 50 #include "ppapi/c/ppb_core.h" | 50 #include "ppapi/c/ppb_core.h" |
| 51 #include "ppapi/c/ppb_graphics_2d.h" | 51 #include "ppapi/c/ppb_graphics_2d.h" |
| 52 #include "ppapi/c/ppb_image_data.h" | 52 #include "ppapi/c/ppb_image_data.h" |
| 53 #include "ppapi/c/ppb_input_event.h" |
| 53 #include "ppapi/c/ppb_instance.h" | 54 #include "ppapi/c/ppb_instance.h" |
| 54 #include "ppapi/c/ppb_messaging.h" | 55 #include "ppapi/c/ppb_messaging.h" |
| 55 #include "ppapi/c/ppb_url_loader.h" | 56 #include "ppapi/c/ppb_url_loader.h" |
| 56 #include "ppapi/c/ppb_url_request_info.h" | 57 #include "ppapi/c/ppb_url_request_info.h" |
| 57 #include "ppapi/c/ppb_url_response_info.h" | 58 #include "ppapi/c/ppb_url_response_info.h" |
| 58 #include "ppapi/c/ppb_var.h" | 59 #include "ppapi/c/ppb_var.h" |
| 59 #include "ppapi/c/ppp.h" | 60 #include "ppapi/c/ppp.h" |
| 60 #include "ppapi/c/ppp_instance.h" | 61 #include "ppapi/c/ppp_instance.h" |
| 61 #include "ppapi/c/private/ppb_flash.h" | 62 #include "ppapi/c/private/ppb_flash.h" |
| 62 #include "ppapi/c/private/ppb_flash_clipboard.h" | 63 #include "ppapi/c/private/ppb_flash_clipboard.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 80 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" | 81 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" |
| 81 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 82 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 82 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" | 83 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" |
| 83 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" | 84 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" |
| 84 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 85 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 85 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 86 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 86 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 87 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| 87 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 88 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
| 88 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 89 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 89 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 90 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 91 #include "webkit/plugins/ppapi/ppb_input_event_impl.h" |
| 90 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" | 92 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" |
| 91 #include "webkit/plugins/ppapi/ppb_opengles_impl.h" | 93 #include "webkit/plugins/ppapi/ppb_opengles_impl.h" |
| 92 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" | 94 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" |
| 93 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 95 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 94 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" | 96 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" |
| 95 #include "webkit/plugins/ppapi/ppb_url_util_impl.h" | 97 #include "webkit/plugins/ppapi/ppb_url_util_impl.h" |
| 96 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 98 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 97 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 99 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 98 #include "webkit/plugins/ppapi/resource_tracker.h" | 100 #include "webkit/plugins/ppapi/resource_tracker.h" |
| 99 #include "webkit/plugins/ppapi/var.h" | 101 #include "webkit/plugins/ppapi/var.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) | 287 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) |
| 286 return ::ppapi::thunk::GetPPB_Font_Thunk(); | 288 return ::ppapi::thunk::GetPPB_Font_Thunk(); |
| 287 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 289 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) |
| 288 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 290 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); |
| 289 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0) | 291 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0) |
| 290 return PPB_Graphics2D_Impl::GetInterface(); | 292 return PPB_Graphics2D_Impl::GetInterface(); |
| 291 if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0) | 293 if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0) |
| 292 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); | 294 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); |
| 293 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 295 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) |
| 294 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 296 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); |
| 297 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE) == 0) |
| 298 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); |
| 295 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0) | 299 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0) |
| 296 return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk(); | 300 return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk(); |
| 297 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0) | 301 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0) |
| 298 return ::ppapi::thunk::GetPPB_Instance_0_5_Thunk(); | 302 return ::ppapi::thunk::GetPPB_Instance_0_5_Thunk(); |
| 299 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 303 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) |
| 300 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 304 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); |
| 305 if (strcmp(name, PPB_KEYBOARD_INPUT_EVENT_INTERFACE) == 0) |
| 306 return ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk(); |
| 301 if (strcmp(name, PPB_MESSAGING_INTERFACE) == 0) | 307 if (strcmp(name, PPB_MESSAGING_INTERFACE) == 0) |
| 302 return PluginInstance::GetMessagingInterface(); | 308 return PluginInstance::GetMessagingInterface(); |
| 309 if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE) == 0) |
| 310 return ::ppapi::thunk::GetPPB_MouseInputEvent_Thunk(); |
| 303 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 311 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
| 304 return PPB_Proxy_Impl::GetInterface(); | 312 return PPB_Proxy_Impl::GetInterface(); |
| 305 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) | 313 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) |
| 306 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); | 314 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); |
| 307 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) | 315 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) |
| 308 return PPB_Scrollbar_Impl::Get0_3Interface(); | 316 return PPB_Scrollbar_Impl::Get0_3Interface(); |
| 309 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 317 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
| 310 return PPB_UMA_Private_Impl::GetInterface(); | 318 return PPB_UMA_Private_Impl::GetInterface(); |
| 311 if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0) | 319 if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0) |
| 312 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); | 320 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); |
| 313 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 321 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) |
| 314 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 322 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); |
| 315 if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0) | 323 if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0) |
| 316 return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); | 324 return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); |
| 317 if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0) | 325 if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0) |
| 318 return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk(); | 326 return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk(); |
| 319 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) | 327 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) |
| 320 return PPB_URLUtil_Impl::GetInterface(); | 328 return PPB_URLUtil_Impl::GetInterface(); |
| 321 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 329 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
| 322 return Var::GetDeprecatedInterface(); | 330 return Var::GetDeprecatedInterface(); |
| 323 if (strcmp(name, PPB_VAR_INTERFACE) == 0) | 331 if (strcmp(name, PPB_VAR_INTERFACE) == 0) |
| 324 return Var::GetInterface(); | 332 return Var::GetInterface(); |
| 325 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) | 333 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) |
| 326 return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(); | 334 return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(); |
| 327 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) | 335 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) |
| 328 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); | 336 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); |
| 337 if (strcmp(name, PPB_WHEEL_INPUT_EVENT_INTERFACE) == 0) |
| 338 return ::ppapi::thunk::GetPPB_WheelInputEvent_Thunk(); |
| 329 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 339 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
| 330 return ::ppapi::thunk::GetPPB_Widget_Thunk(); | 340 return ::ppapi::thunk::GetPPB_Widget_Thunk(); |
| 331 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 341 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
| 332 return PluginInstance::GetZoomInterface(); | 342 return PluginInstance::GetZoomInterface(); |
| 333 | 343 |
| 334 #ifdef ENABLE_GPU | 344 #ifdef ENABLE_GPU |
| 335 // This should really refer to switches::kDisable3DAPIs. | 345 // This should really refer to switches::kDisable3DAPIs. |
| 336 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { | 346 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { |
| 337 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) | 347 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) |
| 338 return ::ppapi::thunk::GetPPB_Graphics3D_Thunk(); | 348 return ::ppapi::thunk::GetPPB_Graphics3D_Thunk(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); | 600 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); |
| 591 if (retval != 0) { | 601 if (retval != 0) { |
| 592 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 602 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 593 return false; | 603 return false; |
| 594 } | 604 } |
| 595 return true; | 605 return true; |
| 596 } | 606 } |
| 597 | 607 |
| 598 } // namespace ppapi | 608 } // namespace ppapi |
| 599 } // namespace webkit | 609 } // namespace webkit |
| OLD | NEW |