Chromium Code Reviews| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 #include "ppapi/c/ppb_url_request_info.h" | 61 #include "ppapi/c/ppb_url_request_info.h" |
| 62 #include "ppapi/c/ppb_url_response_info.h" | 62 #include "ppapi/c/ppb_url_response_info.h" |
| 63 #include "ppapi/c/ppb_var.h" | 63 #include "ppapi/c/ppb_var.h" |
| 64 #include "ppapi/c/ppp.h" | 64 #include "ppapi/c/ppp.h" |
| 65 #include "ppapi/c/ppp_instance.h" | 65 #include "ppapi/c/ppp_instance.h" |
| 66 #include "ppapi/c/private/ppb_flash.h" | 66 #include "ppapi/c/private/ppb_flash.h" |
| 67 #include "ppapi/c/private/ppb_flash_clipboard.h" | 67 #include "ppapi/c/private/ppb_flash_clipboard.h" |
| 68 #include "ppapi/c/private/ppb_flash_file.h" | 68 #include "ppapi/c/private/ppb_flash_file.h" |
| 69 #include "ppapi/c/private/ppb_flash_fullscreen.h" | 69 #include "ppapi/c/private/ppb_flash_fullscreen.h" |
| 70 #include "ppapi/c/private/ppb_flash_tcp_socket.h" | 70 #include "ppapi/c/private/ppb_flash_tcp_socket.h" |
| 71 #include "ppapi/c/private/ppb_flash_udp_socket.h" | |
| 72 #include "ppapi/c/private/ppb_gpu_blacklist_private.h" | 71 #include "ppapi/c/private/ppb_gpu_blacklist_private.h" |
| 73 #include "ppapi/c/private/ppb_instance_private.h" | 72 #include "ppapi/c/private/ppb_instance_private.h" |
| 74 #include "ppapi/c/private/ppb_pdf.h" | 73 #include "ppapi/c/private/ppb_pdf.h" |
| 75 #include "ppapi/c/private/ppb_proxy_private.h" | 74 #include "ppapi/c/private/ppb_proxy_private.h" |
| 75 #include "ppapi/c/private/ppb_tcp_socket_private.h" | |
| 76 #include "ppapi/c/private/ppb_udp_socket_private.h" | |
| 76 #include "ppapi/c/private/ppb_uma_private.h" | 77 #include "ppapi/c/private/ppb_uma_private.h" |
| 77 #include "ppapi/c/trusted/ppb_audio_trusted.h" | 78 #include "ppapi/c/trusted/ppb_audio_trusted.h" |
| 78 #include "ppapi/c/trusted/ppb_broker_trusted.h" | 79 #include "ppapi/c/trusted/ppb_broker_trusted.h" |
| 79 #include "ppapi/c/trusted/ppb_buffer_trusted.h" | 80 #include "ppapi/c/trusted/ppb_buffer_trusted.h" |
| 80 #include "ppapi/c/trusted/ppb_file_chooser_trusted.h" | 81 #include "ppapi/c/trusted/ppb_file_chooser_trusted.h" |
| 81 #include "ppapi/c/trusted/ppb_file_io_trusted.h" | 82 #include "ppapi/c/trusted/ppb_file_io_trusted.h" |
| 82 #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" | 83 #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" |
| 83 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 84 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
| 84 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" | 85 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
| 85 #include "ppapi/shared_impl/input_event_impl.h" | 86 #include "ppapi/shared_impl/input_event_impl.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 return PPB_Flash_Impl::GetInterface(); | 275 return PPB_Flash_Impl::GetInterface(); |
| 275 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) | 276 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) |
| 276 return ::ppapi::thunk::GetPPB_Flash_Clipboard_Thunk(); | 277 return ::ppapi::thunk::GetPPB_Flash_Clipboard_Thunk(); |
| 277 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) | 278 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) |
| 278 return PPB_Flash_File_FileRef_Impl::GetInterface(); | 279 return PPB_Flash_File_FileRef_Impl::GetInterface(); |
| 279 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) | 280 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) |
| 280 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); | 281 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); |
| 281 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) | 282 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) |
| 282 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); | 283 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); |
| 283 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) | 284 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) |
| 284 return ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(); | 285 return ::ppapi::thunk::GetPPB_TCPSocket_Thunk(); |
| 285 if (strcmp(name, PPB_FLASH_UDPSOCKET_INTERFACE) == 0) | |
| 286 return ::ppapi::thunk::GetPPB_Flash_UDPSocket_Thunk(); | |
| 287 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE_0_4) == 0) | 286 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE_0_4) == 0) |
| 288 return ::ppapi::thunk::GetPPB_FlashFullscreen_Thunk(); | 287 return ::ppapi::thunk::GetPPB_FlashFullscreen_Thunk(); |
| 289 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 288 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) |
| 290 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 289 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); |
| 291 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) | 290 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) |
| 292 return PPB_GpuBlacklist_Private_Impl::GetInterface(); | 291 return PPB_GpuBlacklist_Private_Impl::GetInterface(); |
| 293 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) | 292 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) |
| 294 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); | 293 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); |
| 295 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 294 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) |
| 296 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 295 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); |
| 297 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) | 296 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) |
| 298 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); | 297 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); |
| 299 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 298 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) |
| 300 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 299 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); |
| 301 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) | 300 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) |
| 302 return PPB_OpenGLES_Impl::GetInterface(); | 301 return PPB_OpenGLES_Impl::GetInterface(); |
| 303 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 302 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
| 304 return PPB_Proxy_Impl::GetInterface(); | 303 return PPB_Proxy_Impl::GetInterface(); |
| 304 if (strcmp(name, PPB_TCPSOCKET_PRIVATE_INTERFACE) == 0) | |
|
yzshen1
2011/11/11 21:04:28
FYI, if you use 'normal' way (see my comments in i
| |
| 305 return ::ppapi::thunk::GetPPB_TCPSocket_Thunk(); | |
| 306 if (strcmp(name, PPB_UDPSOCKET_PRIVATE_INTERFACE) == 0) | |
| 307 return ::ppapi::thunk::GetPPB_UDPSocket_Thunk(); | |
| 305 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 308 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
| 306 return PPB_UMA_Private_Impl::GetInterface(); | 309 return PPB_UMA_Private_Impl::GetInterface(); |
| 307 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 310 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) |
| 308 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 311 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); |
| 309 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 312 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
| 310 return PPB_Var_Impl::GetVarDeprecatedInterface(); | 313 return PPB_Var_Impl::GetVarDeprecatedInterface(); |
| 311 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) | 314 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
| 312 return PPB_Var_Impl::GetVarInterface(); | 315 return PPB_Var_Impl::GetVarInterface(); |
| 313 | 316 |
| 314 #ifdef ENABLE_FLAPPER_HACKS | 317 #ifdef ENABLE_FLAPPER_HACKS |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 556 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 559 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 557 if (retval != 0) { | 560 if (retval != 0) { |
| 558 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 561 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 559 return false; | 562 return false; |
| 560 } | 563 } |
| 561 return true; | 564 return true; |
| 562 } | 565 } |
| 563 | 566 |
| 564 } // namespace ppapi | 567 } // namespace ppapi |
| 565 } // namespace webkit | 568 } // namespace webkit |
| OLD | NEW |