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/logging.h" | 10 #include "base/logging.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" | 79 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
80 #include "ppapi/shared_impl/input_event_impl.h" | 80 #include "ppapi/shared_impl/input_event_impl.h" |
81 #include "ppapi/shared_impl/time_conversion.h" | 81 #include "ppapi/shared_impl/time_conversion.h" |
82 #include "ppapi/thunk/enter.h" | 82 #include "ppapi/thunk/enter.h" |
83 #include "ppapi/thunk/thunk.h" | 83 #include "ppapi/thunk/thunk.h" |
84 #include "webkit/plugins/plugin_switches.h" | 84 #include "webkit/plugins/plugin_switches.h" |
85 #include "webkit/plugins/ppapi/callbacks.h" | 85 #include "webkit/plugins/ppapi/callbacks.h" |
86 #include "webkit/plugins/ppapi/common.h" | 86 #include "webkit/plugins/ppapi/common.h" |
87 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" | 87 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" |
88 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 88 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 89 #include "webkit/plugins/ppapi/ppb_console_impl.h" |
89 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" | 90 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" |
90 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 91 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
91 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" | 92 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" |
92 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" | 93 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" |
93 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 94 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
94 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 95 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
95 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 96 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
96 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 97 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
97 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" | 98 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" |
98 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 99 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 const void* GetInterface(const char* name) { | 221 const void* GetInterface(const char* name) { |
221 // All interfaces should be used on the main thread. | 222 // All interfaces should be used on the main thread. |
222 CHECK(IsMainThread()); | 223 CHECK(IsMainThread()); |
223 | 224 |
224 // Allow custom interface factories first stab at the GetInterface call. | 225 // Allow custom interface factories first stab at the GetInterface call. |
225 const void* custom_interface = | 226 const void* custom_interface = |
226 PpapiInterfaceFactoryManager::GetInstance()->GetInterface(name); | 227 PpapiInterfaceFactoryManager::GetInstance()->GetInterface(name); |
227 if (custom_interface) | 228 if (custom_interface) |
228 return custom_interface; | 229 return custom_interface; |
229 | 230 |
230 // TODO(brettw) put these in a hash map for better performance. | |
231 #define UNPROXIED_IFACE(api_name, iface_str, iface_struct) \ | |
232 if (strcmp(name, iface_str) == 0) \ | |
233 return ::ppapi::thunk::Get##iface_struct##_Thunk(); | |
234 #define PROXIED_IFACE(api_name, iface_str, iface_struct) \ | |
235 UNPROXIED_IFACE(api_name, iface_str, iface_struct) | |
236 | |
237 #include "ppapi/thunk/interfaces_ppb_public_stable.h" | |
238 #include "ppapi/thunk/interfaces_ppb_public_dev.h" | |
239 #include "ppapi/thunk/interfaces_ppb_private.h" | |
240 | |
241 #undef UNPROXIED_API | |
242 #undef PROXIED_IFACE | |
243 | |
244 // Please keep alphabetized by interface macro name with "special" stuff at | 231 // Please keep alphabetized by interface macro name with "special" stuff at |
245 // the bottom. | 232 // the bottom. |
| 233 if (strcmp(name, PPB_AUDIO_CONFIG_INTERFACE_1_0) == 0) |
| 234 return ::ppapi::thunk::GetPPB_AudioConfig_Thunk(); |
| 235 if (strcmp(name, PPB_AUDIO_INTERFACE_1_0) == 0) |
| 236 return ::ppapi::thunk::GetPPB_Audio_Thunk(); |
246 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0) | 237 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0) |
247 return ::ppapi::thunk::GetPPB_AudioTrusted_Thunk(); | 238 return ::ppapi::thunk::GetPPB_AudioTrusted_Thunk(); |
| 239 if (strcmp(name, PPB_BROKER_TRUSTED_INTERFACE) == 0) |
| 240 return ::ppapi::thunk::GetPPB_Broker_Thunk(); |
| 241 if (strcmp(name, PPB_BUFFER_DEV_INTERFACE) == 0) |
| 242 return ::ppapi::thunk::GetPPB_Buffer_Thunk(); |
248 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE) == 0) | 243 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE) == 0) |
249 return ::ppapi::thunk::GetPPB_BufferTrusted_Thunk(); | 244 return ::ppapi::thunk::GetPPB_BufferTrusted_Thunk(); |
250 if (strcmp(name, PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE) == 0) | 245 if (strcmp(name, PPB_CHAR_SET_DEV_INTERFACE) == 0) |
251 return ::ppapi::thunk::GetPPB_Context3DTrusted_Thunk(); | 246 return ::ppapi::thunk::GetPPB_CharSet_Thunk(); |
| 247 if (strcmp(name, PPB_CONSOLE_DEV_INTERFACE) == 0) |
| 248 return PPB_Console_Impl::GetInterface(); |
252 if (strcmp(name, PPB_CORE_INTERFACE) == 0) | 249 if (strcmp(name, PPB_CORE_INTERFACE) == 0) |
253 return &core_interface; | 250 return &core_interface; |
254 if (strcmp(name, PPB_CRYPTO_DEV_INTERFACE) == 0) | 251 if (strcmp(name, PPB_CRYPTO_DEV_INTERFACE) == 0) |
255 return PPB_Crypto_Impl::GetInterface(); | 252 return PPB_Crypto_Impl::GetInterface(); |
| 253 if (strcmp(name, PPB_CURSOR_CONTROL_DEV_INTERFACE) == 0) |
| 254 return ::ppapi::thunk::GetPPB_CursorControl_Thunk(); |
256 if (strcmp(name, PPB_DIRECTORYREADER_DEV_INTERFACE) == 0) | 255 if (strcmp(name, PPB_DIRECTORYREADER_DEV_INTERFACE) == 0) |
257 return ::ppapi::thunk::GetPPB_DirectoryReader_Dev_Thunk(); | 256 return ::ppapi::thunk::GetPPB_DirectoryReader_Thunk(); |
| 257 if (strcmp(name, PPB_FILECHOOSER_DEV_INTERFACE) == 0) |
| 258 return ::ppapi::thunk::GetPPB_FileChooser_Thunk(); |
| 259 if (strcmp(name, PPB_FILEIO_INTERFACE_1_0) == 0) |
| 260 return ::ppapi::thunk::GetPPB_FileIO_Thunk(); |
258 if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0) | 261 if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0) |
259 return ::ppapi::thunk::GetPPB_FileIOTrusted_Thunk(); | 262 return ::ppapi::thunk::GetPPB_FileIOTrusted_Thunk(); |
| 263 if (strcmp(name, PPB_FILEREF_INTERFACE_1_0) == 0) |
| 264 return ::ppapi::thunk::GetPPB_FileRef_Thunk(); |
| 265 if (strcmp(name, PPB_FILESYSTEM_INTERFACE_1_0) == 0) |
| 266 return ::ppapi::thunk::GetPPB_FileSystem_Thunk(); |
260 if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0) | 267 if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0) |
261 return ::ppapi::thunk::GetPPB_Find_Thunk(); | 268 return ::ppapi::thunk::GetPPB_Find_Thunk(); |
262 if (strcmp(name, PPB_FLASH_INTERFACE) == 0) | 269 if (strcmp(name, PPB_FLASH_INTERFACE) == 0) |
263 return PPB_Flash_Impl::GetInterface(); | 270 return PPB_Flash_Impl::GetInterface(); |
264 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) | 271 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) |
265 return PPB_Flash_Clipboard_Impl::GetInterface(); | 272 return PPB_Flash_Clipboard_Impl::GetInterface(); |
266 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) | 273 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) |
267 return PPB_Flash_File_FileRef_Impl::GetInterface(); | 274 return PPB_Flash_File_FileRef_Impl::GetInterface(); |
268 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) | 275 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) |
269 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); | 276 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); |
270 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) | 277 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) |
271 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); | 278 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); |
272 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) | 279 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) |
273 return ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(); | 280 return ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(); |
| 281 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) |
| 282 return ::ppapi::thunk::GetPPB_Font_Thunk(); |
274 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 283 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) |
275 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 284 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); |
276 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) | 285 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) |
277 return PPB_GpuBlacklist_Private_Impl::GetInterface(); | 286 return PPB_GpuBlacklist_Private_Impl::GetInterface(); |
278 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) | 287 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE_1_0) == 0) |
279 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); | 288 return ::ppapi::thunk::GetPPB_Graphics2D_Thunk(); |
| 289 if (strcmp(name, PPB_IMAGEDATA_INTERFACE_1_0) == 0) |
| 290 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); |
280 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 291 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) |
281 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 292 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); |
282 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) | 293 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) |
283 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); | 294 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); |
| 295 if (strcmp(name, PPB_INSTANCE_INTERFACE_1_0) == 0) |
| 296 return ::ppapi::thunk::GetPPB_Instance_1_0_Thunk(); |
284 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 297 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) |
285 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 298 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); |
286 if (strcmp(name, PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == 0) | 299 if (strcmp(name, PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0) == 0) |
287 return ::ppapi::thunk::GetPPB_LayerCompositor_Thunk(); | 300 return ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk(); |
288 if (strcmp(name, PPB_MEMORY_DEV_INTERFACE) == 0) | 301 if (strcmp(name, PPB_MEMORY_DEV_INTERFACE) == 0) |
289 return PPB_Memory_Impl::GetInterface(); | 302 return PPB_Memory_Impl::GetInterface(); |
290 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) | 303 if (strcmp(name, PPB_MESSAGING_INTERFACE_1_0) == 0) |
291 return PPB_OpenGLES_Impl::GetInterface(); | 304 return ::ppapi::thunk::GetPPB_Messaging_Thunk(); |
| 305 if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0) == 0) |
| 306 return ::ppapi::thunk::GetPPB_MouseInputEvent_1_0_Thunk(); |
| 307 if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1) == 0) |
| 308 return ::ppapi::thunk::GetPPB_MouseInputEvent_1_1_Thunk(); |
| 309 if (strcmp(name, PPB_MOUSELOCK_DEV_INTERFACE) == 0) |
| 310 return ::ppapi::thunk::GetPPB_MouseLock_Thunk(); |
292 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 311 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
293 return PPB_Proxy_Impl::GetInterface(); | 312 return PPB_Proxy_Impl::GetInterface(); |
294 if (strcmp(name, PPB_QUERY_POLICY_DEV_INTERFACE_0_1) == 0) | 313 if (strcmp(name, PPB_QUERY_POLICY_DEV_INTERFACE_0_1) == 0) |
295 return ::ppapi::thunk::GetPPB_QueryPolicy_Thunk(); | 314 return ::ppapi::thunk::GetPPB_QueryPolicy_Thunk(); |
296 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) | 315 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) |
297 return PPB_Scrollbar_Impl::Get0_4Interface(); | 316 return PPB_Scrollbar_Impl::Get0_4Interface(); |
298 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) | 317 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) |
299 return PPB_Scrollbar_Impl::Get0_3Interface(); | 318 return PPB_Scrollbar_Impl::Get0_3Interface(); |
300 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_5) == 0) | 319 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_5) == 0) |
301 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); | 320 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); |
302 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 321 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
303 return PPB_UMA_Private_Impl::GetInterface(); | 322 return PPB_UMA_Private_Impl::GetInterface(); |
| 323 if (strcmp(name, PPB_URLLOADER_INTERFACE_1_0) == 0) |
| 324 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); |
304 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 325 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) |
305 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 326 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); |
| 327 if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE_1_0) == 0) |
| 328 return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); |
| 329 if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE_1_0) == 0) |
| 330 return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk(); |
306 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) | 331 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) |
307 return PPB_URLUtil_Impl::GetInterface(); | 332 return PPB_URLUtil_Impl::GetInterface(); |
308 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 333 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
309 return PPB_Var_Impl::GetVarDeprecatedInterface(); | 334 return PPB_Var_Impl::GetVarDeprecatedInterface(); |
310 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) | 335 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
311 return PPB_Var_Impl::GetVarInterface(); | 336 return PPB_Var_Impl::GetVarInterface(); |
| 337 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) |
| 338 return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk(); |
| 339 if (strcmp(name, PPB_VIDEO_CAPTURE_DEV_INTERFACE) == 0) |
| 340 return ::ppapi::thunk::GetPPB_VideoCapture_Thunk(); |
312 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) | 341 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) |
313 return ::ppapi::thunk::GetPPB_VideoLayer_Dev_Thunk(); | 342 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); |
| 343 if (strcmp(name, PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0) == 0) |
| 344 return ::ppapi::thunk::GetPPB_WheelInputEvent_Thunk(); |
314 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 345 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
315 return ::ppapi::thunk::GetPPB_Widget_Dev_Thunk(); | 346 return ::ppapi::thunk::GetPPB_Widget_Thunk(); |
316 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 347 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
317 return ::ppapi::thunk::GetPPB_Zoom_Thunk(); | 348 return ::ppapi::thunk::GetPPB_Zoom_Thunk(); |
318 | 349 |
| 350 #ifdef ENABLE_GPU |
| 351 if (strcmp(name, PPB_GRAPHICS_3D_INTERFACE) == 0) |
| 352 return ::ppapi::thunk::GetPPB_Graphics3D_Thunk(); |
| 353 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) |
| 354 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); |
| 355 if (strcmp(name, PPB_CONTEXT_3D_DEV_INTERFACE) == 0) |
| 356 return ::ppapi::thunk::GetPPB_Context3D_Thunk(); |
| 357 if (strcmp(name, PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE) == 0) |
| 358 return ::ppapi::thunk::GetPPB_Context3DTrusted_Thunk(); |
| 359 if (strcmp(name, PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == 0) |
| 360 return ::ppapi::thunk::GetPPB_GLESChromiumTextureMapping_Thunk(); |
| 361 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) |
| 362 return PPB_OpenGLES_Impl::GetInterface(); |
| 363 if (strcmp(name, PPB_SURFACE_3D_DEV_INTERFACE) == 0) |
| 364 return ::ppapi::thunk::GetPPB_Surface3D_Thunk(); |
| 365 if (strcmp(name, PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == 0) |
| 366 return ::ppapi::thunk::GetPPB_LayerCompositor_Thunk(); |
| 367 #endif // ENABLE_GPU |
| 368 |
319 #ifdef ENABLE_FLAPPER_HACKS | 369 #ifdef ENABLE_FLAPPER_HACKS |
320 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) | 370 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) |
321 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); | 371 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); |
322 #endif // ENABLE_FLAPPER_HACKS | 372 #endif // ENABLE_FLAPPER_HACKS |
323 | 373 |
324 #if defined(ENABLE_P2P_APIS) | 374 #if defined(ENABLE_P2P_APIS) |
325 if (strcmp(name, PPB_TRANSPORT_DEV_INTERFACE) == 0) | 375 if (strcmp(name, PPB_TRANSPORT_DEV_INTERFACE) == 0) |
326 return ::ppapi::thunk::GetPPB_Transport_Dev_Thunk(); | 376 return ::ppapi::thunk::GetPPB_Transport_Thunk(); |
327 #endif | 377 #endif |
328 | 378 |
329 // Only support the testing interface when the command line switch is | 379 // Only support the testing interface when the command line switch is |
330 // specified. This allows us to prevent people from (ab)using this interface | 380 // specified. This allows us to prevent people from (ab)using this interface |
331 // in production code. | 381 // in production code. |
332 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { | 382 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { |
333 if (CommandLine::ForCurrentProcess()->HasSwitch( | 383 if (CommandLine::ForCurrentProcess()->HasSwitch( |
334 switches::kEnablePepperTesting)) | 384 switches::kEnablePepperTesting)) |
335 return &testing_interface; | 385 return &testing_interface; |
336 } | 386 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 605 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
556 if (retval != 0) { | 606 if (retval != 0) { |
557 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 607 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
558 return false; | 608 return false; |
559 } | 609 } |
560 return true; | 610 return true; |
561 } | 611 } |
562 | 612 |
563 } // namespace ppapi | 613 } // namespace ppapi |
564 } // namespace webkit | 614 } // namespace webkit |
OLD | NEW |