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