| 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 18 matching lines...) Expand all Loading... |
| 81 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" | 82 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" |
| 82 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 83 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 83 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" | 84 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" |
| 84 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" | 85 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" |
| 85 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 86 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 86 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 87 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 87 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 88 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| 88 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 89 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
| 89 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 90 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 90 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 91 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 92 #include "webkit/plugins/ppapi/ppb_input_event_impl.h" |
| 91 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" | 93 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" |
| 92 #include "webkit/plugins/ppapi/ppb_opengles_impl.h" | 94 #include "webkit/plugins/ppapi/ppb_opengles_impl.h" |
| 93 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" | 95 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" |
| 94 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 96 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 95 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" | 97 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" |
| 96 #include "webkit/plugins/ppapi/ppb_url_util_impl.h" | 98 #include "webkit/plugins/ppapi/ppb_url_util_impl.h" |
| 97 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 99 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| 98 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 100 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 99 #include "webkit/plugins/ppapi/resource_tracker.h" | 101 #include "webkit/plugins/ppapi/resource_tracker.h" |
| 100 #include "webkit/plugins/ppapi/var.h" | 102 #include "webkit/plugins/ppapi/var.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) | 281 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) |
| 280 return ::ppapi::thunk::GetPPB_Font_Thunk(); | 282 return ::ppapi::thunk::GetPPB_Font_Thunk(); |
| 281 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 283 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) |
| 282 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 284 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); |
| 283 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0) | 285 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0) |
| 284 return PPB_Graphics2D_Impl::GetInterface(); | 286 return PPB_Graphics2D_Impl::GetInterface(); |
| 285 if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0) | 287 if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0) |
| 286 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); | 288 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); |
| 287 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 289 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) |
| 288 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 290 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); |
| 291 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE) == 0) |
| 292 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); |
| 289 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0) | 293 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0) |
| 290 return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk(); | 294 return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk(); |
| 291 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0) | 295 if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0) |
| 292 return ::ppapi::thunk::GetPPB_Instance_0_5_Thunk(); | 296 return ::ppapi::thunk::GetPPB_Instance_0_5_Thunk(); |
| 293 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 297 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) |
| 294 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 298 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); |
| 299 if (strcmp(name, PPB_KEYBOARD_INPUT_EVENT_INTERFACE) == 0) |
| 300 return ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk(); |
| 295 if (strcmp(name, PPB_MESSAGING_INTERFACE) == 0) | 301 if (strcmp(name, PPB_MESSAGING_INTERFACE) == 0) |
| 296 return PluginInstance::GetMessagingInterface(); | 302 return PluginInstance::GetMessagingInterface(); |
| 303 if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE) == 0) |
| 304 return ::ppapi::thunk::GetPPB_MouseInputEvent_Thunk(); |
| 297 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 305 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
| 298 return PPB_Proxy_Impl::GetInterface(); | 306 return PPB_Proxy_Impl::GetInterface(); |
| 299 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) | 307 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) |
| 300 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); | 308 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); |
| 301 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) | 309 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) |
| 302 return PPB_Scrollbar_Impl::Get0_3Interface(); | 310 return PPB_Scrollbar_Impl::Get0_3Interface(); |
| 303 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 311 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
| 304 return PPB_UMA_Private_Impl::GetInterface(); | 312 return PPB_UMA_Private_Impl::GetInterface(); |
| 305 if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0) | 313 if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0) |
| 306 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); | 314 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); |
| 307 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 315 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) |
| 308 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 316 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); |
| 309 if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0) | 317 if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0) |
| 310 return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); | 318 return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); |
| 311 if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0) | 319 if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0) |
| 312 return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk(); | 320 return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk(); |
| 313 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) | 321 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) |
| 314 return PPB_URLUtil_Impl::GetInterface(); | 322 return PPB_URLUtil_Impl::GetInterface(); |
| 315 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 323 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
| 316 return Var::GetDeprecatedInterface(); | 324 return Var::GetDeprecatedInterface(); |
| 317 if (strcmp(name, PPB_VAR_INTERFACE) == 0) | 325 if (strcmp(name, PPB_VAR_INTERFACE) == 0) |
| 318 return Var::GetInterface(); | 326 return Var::GetInterface(); |
| 319 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) | 327 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) |
| 320 return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(); | 328 return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(); |
| 321 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) | 329 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) |
| 322 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); | 330 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); |
| 331 if (strcmp(name, PPB_WHEEL_INPUT_EVENT_INTERFACE) == 0) |
| 332 return ::ppapi::thunk::GetPPB_WheelInputEvent_Thunk(); |
| 323 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 333 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
| 324 return ::ppapi::thunk::GetPPB_Widget_Thunk(); | 334 return ::ppapi::thunk::GetPPB_Widget_Thunk(); |
| 325 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 335 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
| 326 return PluginInstance::GetZoomInterface(); | 336 return PluginInstance::GetZoomInterface(); |
| 327 | 337 |
| 328 #ifdef ENABLE_GPU | 338 #ifdef ENABLE_GPU |
| 329 // This should really refer to switches::kDisable3DAPIs. | 339 // This should really refer to switches::kDisable3DAPIs. |
| 330 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { | 340 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { |
| 331 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) | 341 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) |
| 332 return ::ppapi::thunk::GetPPB_Graphics3D_Thunk(); | 342 return ::ppapi::thunk::GetPPB_Graphics3D_Thunk(); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); | 587 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); |
| 578 if (retval != 0) { | 588 if (retval != 0) { |
| 579 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 589 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 580 return false; | 590 return false; |
| 581 } | 591 } |
| 582 return true; | 592 return true; |
| 583 } | 593 } |
| 584 | 594 |
| 585 } // namespace ppapi | 595 } // namespace ppapi |
| 586 } // namespace webkit | 596 } // namespace webkit |
| OLD | NEW |