| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #include "webkit/plugins/plugin_switches.h" | 104 #include "webkit/plugins/plugin_switches.h" |
| 105 #include "webkit/plugins/ppapi/common.h" | 105 #include "webkit/plugins/ppapi/common.h" |
| 106 #include "webkit/plugins/ppapi/host_globals.h" | 106 #include "webkit/plugins/ppapi/host_globals.h" |
| 107 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" | 107 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" |
| 108 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 108 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 109 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 109 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 110 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" | 110 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" |
| 111 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" | 111 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" |
| 112 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 112 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 113 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 113 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 114 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | |
| 115 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" | 114 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" |
| 116 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 115 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 117 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 116 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 118 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" | 117 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" |
| 119 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" | 118 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" |
| 120 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 119 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 121 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" | 120 #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" |
| 122 #include "webkit/plugins/ppapi/ppb_var_deprecated_impl.h" | 121 #include "webkit/plugins/ppapi/ppb_var_deprecated_impl.h" |
| 123 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" | 122 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
| 124 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 123 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_0_3_Thunk(); | 366 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_0_3_Thunk(); |
| 368 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 367 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
| 369 return PPB_Var_Deprecated_Impl::GetVarDeprecatedInterface(); | 368 return PPB_Var_Deprecated_Impl::GetVarDeprecatedInterface(); |
| 370 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) | 369 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
| 371 return ::ppapi::PPB_Var_Shared::GetVarInterface1_0(); | 370 return ::ppapi::PPB_Var_Shared::GetVarInterface1_0(); |
| 372 if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0) | 371 if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0) |
| 373 return ::ppapi::PPB_Var_Shared::GetVarInterface1_1(); | 372 return ::ppapi::PPB_Var_Shared::GetVarInterface1_1(); |
| 374 if (strcmp(name, PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0) == 0) | 373 if (strcmp(name, PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0) == 0) |
| 375 return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface1_0(); | 374 return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface1_0(); |
| 376 | 375 |
| 377 #ifdef ENABLE_FLAPPER_HACKS | |
| 378 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) | |
| 379 return ::ppapi::thunk::GetPPB_Flash_NetConnector_0_2_Thunk(); | |
| 380 #endif // ENABLE_FLAPPER_HACKS | |
| 381 | |
| 382 // Only support the testing interface when the command line switch is | 376 // Only support the testing interface when the command line switch is |
| 383 // specified. This allows us to prevent people from (ab)using this interface | 377 // specified. This allows us to prevent people from (ab)using this interface |
| 384 // in production code. | 378 // in production code. |
| 385 if (CommandLine::ForCurrentProcess()->HasSwitch( | 379 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 386 switches::kEnablePepperTesting)) { | 380 switches::kEnablePepperTesting)) { |
| 387 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 || | 381 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 || |
| 388 strcmp(name, PPB_TESTING_DEV_INTERFACE_0_9) == 0) { | 382 strcmp(name, PPB_TESTING_DEV_INTERFACE_0_9) == 0) { |
| 389 return &testing_interface; | 383 return &testing_interface; |
| 390 } | 384 } |
| 391 } | 385 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 614 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 621 if (retval != 0) { | 615 if (retval != 0) { |
| 622 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 616 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 623 return false; | 617 return false; |
| 624 } | 618 } |
| 625 return true; | 619 return true; |
| 626 } | 620 } |
| 627 | 621 |
| 628 } // namespace ppapi | 622 } // namespace ppapi |
| 629 } // namespace webkit | 623 } // namespace webkit |
| OLD | NEW |