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" | |
90 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" | 89 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" |
91 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 90 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
92 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" | 91 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h" |
93 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" | 92 #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" |
94 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 93 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
95 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 94 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
96 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 95 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
97 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 96 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
98 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" | 97 #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" |
99 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 98 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 const void* GetInterface(const char* name) { | 220 const void* GetInterface(const char* name) { |
222 // All interfaces should be used on the main thread. | 221 // All interfaces should be used on the main thread. |
223 CHECK(IsMainThread()); | 222 CHECK(IsMainThread()); |
224 | 223 |
225 // Allow custom interface factories first stab at the GetInterface call. | 224 // Allow custom interface factories first stab at the GetInterface call. |
226 const void* custom_interface = | 225 const void* custom_interface = |
227 PpapiInterfaceFactoryManager::GetInstance()->GetInterface(name); | 226 PpapiInterfaceFactoryManager::GetInstance()->GetInterface(name); |
228 if (custom_interface) | 227 if (custom_interface) |
229 return custom_interface; | 228 return custom_interface; |
230 | 229 |
| 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 |
231 // Please keep alphabetized by interface macro name with "special" stuff at | 244 // Please keep alphabetized by interface macro name with "special" stuff at |
232 // the bottom. | 245 // 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(); | |
237 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0) | 246 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0) |
238 return ::ppapi::thunk::GetPPB_AudioTrusted_Thunk(); | 247 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(); | |
243 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE) == 0) | 248 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE) == 0) |
244 return ::ppapi::thunk::GetPPB_BufferTrusted_Thunk(); | 249 return ::ppapi::thunk::GetPPB_BufferTrusted_Thunk(); |
245 if (strcmp(name, PPB_CHAR_SET_DEV_INTERFACE) == 0) | 250 if (strcmp(name, PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE) == 0) |
246 return ::ppapi::thunk::GetPPB_CharSet_Thunk(); | 251 return ::ppapi::thunk::GetPPB_Context3DTrusted_Thunk(); |
247 if (strcmp(name, PPB_CONSOLE_DEV_INTERFACE) == 0) | |
248 return PPB_Console_Impl::GetInterface(); | |
249 if (strcmp(name, PPB_CORE_INTERFACE) == 0) | 252 if (strcmp(name, PPB_CORE_INTERFACE) == 0) |
250 return &core_interface; | 253 return &core_interface; |
251 if (strcmp(name, PPB_CRYPTO_DEV_INTERFACE) == 0) | 254 if (strcmp(name, PPB_CRYPTO_DEV_INTERFACE) == 0) |
252 return PPB_Crypto_Impl::GetInterface(); | 255 return PPB_Crypto_Impl::GetInterface(); |
253 if (strcmp(name, PPB_CURSOR_CONTROL_DEV_INTERFACE) == 0) | |
254 return ::ppapi::thunk::GetPPB_CursorControl_Thunk(); | |
255 if (strcmp(name, PPB_DIRECTORYREADER_DEV_INTERFACE) == 0) | 256 if (strcmp(name, PPB_DIRECTORYREADER_DEV_INTERFACE) == 0) |
256 return ::ppapi::thunk::GetPPB_DirectoryReader_Thunk(); | 257 return ::ppapi::thunk::GetPPB_DirectoryReader_Dev_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(); | |
261 if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0) | 258 if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0) |
262 return ::ppapi::thunk::GetPPB_FileIOTrusted_Thunk(); | 259 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(); | |
267 if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0) | 260 if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0) |
268 return ::ppapi::thunk::GetPPB_Find_Thunk(); | 261 return ::ppapi::thunk::GetPPB_Find_Thunk(); |
269 if (strcmp(name, PPB_FLASH_INTERFACE) == 0) | 262 if (strcmp(name, PPB_FLASH_INTERFACE) == 0) |
270 return PPB_Flash_Impl::GetInterface(); | 263 return PPB_Flash_Impl::GetInterface(); |
271 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) | 264 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) |
272 return PPB_Flash_Clipboard_Impl::GetInterface(); | 265 return PPB_Flash_Clipboard_Impl::GetInterface(); |
273 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) | 266 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) |
274 return PPB_Flash_File_FileRef_Impl::GetInterface(); | 267 return PPB_Flash_File_FileRef_Impl::GetInterface(); |
275 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) | 268 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) |
276 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); | 269 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); |
277 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) | 270 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) |
278 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); | 271 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); |
279 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) | 272 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) |
280 return ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(); | 273 return ::ppapi::thunk::GetPPB_Flash_TCPSocket_Thunk(); |
281 if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0) | |
282 return ::ppapi::thunk::GetPPB_Font_Thunk(); | |
283 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 274 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) |
284 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 275 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); |
285 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) | 276 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) |
286 return PPB_GpuBlacklist_Private_Impl::GetInterface(); | 277 return PPB_GpuBlacklist_Private_Impl::GetInterface(); |
287 if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE_1_0) == 0) | 278 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) |
288 return ::ppapi::thunk::GetPPB_Graphics2D_Thunk(); | 279 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); |
289 if (strcmp(name, PPB_IMAGEDATA_INTERFACE_1_0) == 0) | |
290 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); | |
291 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 280 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) |
292 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 281 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); |
293 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) | 282 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) |
294 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); | 283 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(); | |
297 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 284 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) |
298 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 285 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); |
299 if (strcmp(name, PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0) == 0) | 286 if (strcmp(name, PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == 0) |
300 return ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk(); | 287 return ::ppapi::thunk::GetPPB_LayerCompositor_Thunk(); |
301 if (strcmp(name, PPB_MEMORY_DEV_INTERFACE) == 0) | 288 if (strcmp(name, PPB_MEMORY_DEV_INTERFACE) == 0) |
302 return PPB_Memory_Impl::GetInterface(); | 289 return PPB_Memory_Impl::GetInterface(); |
303 if (strcmp(name, PPB_MESSAGING_INTERFACE_1_0) == 0) | 290 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) |
304 return ::ppapi::thunk::GetPPB_Messaging_Thunk(); | 291 return PPB_OpenGLES_Impl::GetInterface(); |
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(); | |
311 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 292 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
312 return PPB_Proxy_Impl::GetInterface(); | 293 return PPB_Proxy_Impl::GetInterface(); |
313 if (strcmp(name, PPB_QUERY_POLICY_DEV_INTERFACE_0_1) == 0) | 294 if (strcmp(name, PPB_QUERY_POLICY_DEV_INTERFACE_0_1) == 0) |
314 return ::ppapi::thunk::GetPPB_QueryPolicy_Thunk(); | 295 return ::ppapi::thunk::GetPPB_QueryPolicy_Thunk(); |
315 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) | 296 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_4) == 0) |
316 return PPB_Scrollbar_Impl::Get0_4Interface(); | 297 return PPB_Scrollbar_Impl::Get0_4Interface(); |
317 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) | 298 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_3) == 0) |
318 return PPB_Scrollbar_Impl::Get0_3Interface(); | 299 return PPB_Scrollbar_Impl::Get0_3Interface(); |
319 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_5) == 0) | 300 if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE_0_5) == 0) |
320 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); | 301 return ::ppapi::thunk::GetPPB_Scrollbar_Thunk(); |
321 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 302 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
322 return PPB_UMA_Private_Impl::GetInterface(); | 303 return PPB_UMA_Private_Impl::GetInterface(); |
323 if (strcmp(name, PPB_URLLOADER_INTERFACE_1_0) == 0) | |
324 return ::ppapi::thunk::GetPPB_URLLoader_Thunk(); | |
325 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 304 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) |
326 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 305 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(); | |
331 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) | 306 if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0) |
332 return PPB_URLUtil_Impl::GetInterface(); | 307 return PPB_URLUtil_Impl::GetInterface(); |
333 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 308 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
334 return PPB_Var_Impl::GetVarDeprecatedInterface(); | 309 return PPB_Var_Impl::GetVarDeprecatedInterface(); |
335 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) | 310 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
336 return PPB_Var_Impl::GetVarInterface(); | 311 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(); | |
341 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) | 312 if (strcmp(name, PPB_VIDEOLAYER_DEV_INTERFACE) == 0) |
342 return ::ppapi::thunk::GetPPB_VideoLayer_Thunk(); | 313 return ::ppapi::thunk::GetPPB_VideoLayer_Dev_Thunk(); |
343 if (strcmp(name, PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0) == 0) | |
344 return ::ppapi::thunk::GetPPB_WheelInputEvent_Thunk(); | |
345 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) | 314 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) |
346 return ::ppapi::thunk::GetPPB_Widget_Thunk(); | 315 return ::ppapi::thunk::GetPPB_Widget_Dev_Thunk(); |
347 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) | 316 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) |
348 return ::ppapi::thunk::GetPPB_Zoom_Thunk(); | 317 return ::ppapi::thunk::GetPPB_Zoom_Thunk(); |
349 | 318 |
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 | |
369 #ifdef ENABLE_FLAPPER_HACKS | 319 #ifdef ENABLE_FLAPPER_HACKS |
370 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) | 320 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) |
371 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); | 321 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); |
372 #endif // ENABLE_FLAPPER_HACKS | 322 #endif // ENABLE_FLAPPER_HACKS |
373 | 323 |
374 #if defined(ENABLE_P2P_APIS) | 324 #if defined(ENABLE_P2P_APIS) |
375 if (strcmp(name, PPB_TRANSPORT_DEV_INTERFACE) == 0) | 325 if (strcmp(name, PPB_TRANSPORT_DEV_INTERFACE) == 0) |
376 return ::ppapi::thunk::GetPPB_Transport_Thunk(); | 326 return ::ppapi::thunk::GetPPB_Transport_Dev_Thunk(); |
377 #endif | 327 #endif |
378 | 328 |
379 // Only support the testing interface when the command line switch is | 329 // Only support the testing interface when the command line switch is |
380 // specified. This allows us to prevent people from (ab)using this interface | 330 // specified. This allows us to prevent people from (ab)using this interface |
381 // in production code. | 331 // in production code. |
382 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { | 332 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { |
383 if (CommandLine::ForCurrentProcess()->HasSwitch( | 333 if (CommandLine::ForCurrentProcess()->HasSwitch( |
384 switches::kEnablePepperTesting)) | 334 switches::kEnablePepperTesting)) |
385 return &testing_interface; | 335 return &testing_interface; |
386 } | 336 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 555 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
606 if (retval != 0) { | 556 if (retval != 0) { |
607 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 557 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
608 return false; | 558 return false; |
609 } | 559 } |
610 return true; | 560 return true; |
611 } | 561 } |
612 | 562 |
613 } // namespace ppapi | 563 } // namespace ppapi |
614 } // namespace webkit | 564 } // namespace webkit |
OLD | NEW |