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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 #include "ppapi/thunk/interfaces_ppb_public_stable.h" | 279 #include "ppapi/thunk/interfaces_ppb_public_stable.h" |
280 #include "ppapi/thunk/interfaces_ppb_public_dev.h" | 280 #include "ppapi/thunk/interfaces_ppb_public_dev.h" |
281 #include "ppapi/thunk/interfaces_ppb_private.h" | 281 #include "ppapi/thunk/interfaces_ppb_private.h" |
282 | 282 |
283 #undef UNPROXIED_API | 283 #undef UNPROXIED_API |
284 #undef PROXIED_IFACE | 284 #undef PROXIED_IFACE |
285 | 285 |
286 // Please keep alphabetized by interface macro name with "special" stuff at | 286 // Please keep alphabetized by interface macro name with "special" stuff at |
287 // the bottom. | 287 // the bottom. |
288 if (strcmp(name, PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE) == 0) | 288 if (strcmp(name, PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE_0_1) == 0) |
289 return ::ppapi::thunk::GetPPB_AudioInputTrusted_Thunk(); | 289 return ::ppapi::thunk::GetPPB_AudioInputTrusted_0_1_Thunk(); |
290 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0) | 290 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE_0_6) == 0) |
291 return ::ppapi::thunk::GetPPB_AudioTrusted_Thunk(); | 291 return ::ppapi::thunk::GetPPB_AudioTrusted_0_6_Thunk(); |
292 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE) == 0) | 292 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE_0_1) == 0) |
293 return ::ppapi::thunk::GetPPB_BufferTrusted_Thunk(); | 293 return ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk(); |
294 if (strcmp(name, PPB_CORE_INTERFACE) == 0) | 294 if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) |
295 return &core_interface; | 295 return &core_interface; |
296 if (strcmp(name, PPB_FILECHOOSER_TRUSTED_INTERFACE) == 0) | 296 if (strcmp(name, PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5) == 0) |
297 return ::ppapi::thunk::GetPPB_FileChooser_Trusted_Thunk(); | 297 return ::ppapi::thunk::GetPPB_FileChooser_Trusted_0_5_Thunk(); |
298 if (strcmp(name, PPB_FLASH_INTERFACE_11_0) == 0) | 298 if (strcmp(name, PPB_FLASH_INTERFACE_11_0) == 0) |
299 return PPB_Flash_Impl::GetInterface11(); | 299 return PPB_Flash_Impl::GetInterface11(); |
300 if (strcmp(name, PPB_FLASH_INTERFACE_12_0) == 0) | 300 if (strcmp(name, PPB_FLASH_INTERFACE_12_0) == 0) |
301 return PPB_Flash_Impl::GetInterface12(); | 301 return PPB_Flash_Impl::GetInterface12(); |
302 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE) == 0) | 302 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_0) == 0) |
303 return ::ppapi::thunk::GetPPB_Flash_Clipboard_Thunk(); | 303 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); |
304 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY) == 0) | 304 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY) == 0) |
305 return ::ppapi::thunk::GetPPB_Flash_Clipboard_Thunk(); | 305 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); |
306 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) | 306 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) |
307 return PPB_Flash_File_FileRef_Impl::GetInterface(); | 307 return PPB_Flash_File_FileRef_Impl::GetInterface(); |
308 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) | 308 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) |
309 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); | 309 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); |
310 if (strcmp(name, PPB_FLASH_MENU_INTERFACE) == 0) | 310 if (strcmp(name, PPB_FLASH_MENU_INTERFACE_0_2) == 0) |
311 return ::ppapi::thunk::GetPPB_Flash_Menu_Thunk(); | 311 return ::ppapi::thunk::GetPPB_Flash_Menu_0_2_Thunk(); |
312 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE) == 0) | 312 if (strcmp(name, PPB_FLASH_TCPSOCKET_INTERFACE_0_2) == 0) |
313 return ::ppapi::thunk::GetPPB_TCPSocket_Private_Thunk(); | 313 return ::ppapi::thunk::GetPPB_TCPSocket_Private_0_3_Thunk(); |
314 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0) | 314 if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE_0_5) == 0) |
315 return ::ppapi::thunk::GetPPB_Fullscreen_Thunk(); | 315 return ::ppapi::thunk::GetPPB_Fullscreen_1_0_Thunk(); |
316 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) | 316 if (strcmp(name, PPB_GPU_BLACKLIST_INTERFACE) == 0) |
317 return PPB_GpuBlacklist_Private_Impl::GetInterface(); | 317 return PPB_GpuBlacklist_Private_Impl::GetInterface(); |
318 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE) == 0) | 318 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0) == 0) |
319 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_Thunk(); | 319 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_1_0_Thunk(); |
320 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0) | 320 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4) == 0) |
321 return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk(); | 321 return ::ppapi::thunk::GetPPB_ImageDataTrusted_0_4_Thunk(); |
322 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) | 322 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0) |
323 return ::ppapi::thunk::GetPPB_InputEvent_Thunk(); | 323 return ::ppapi::thunk::GetPPB_InputEvent_1_0_Thunk(); |
324 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) | 324 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE_0_1) == 0) |
325 return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); | 325 return ::ppapi::thunk::GetPPB_Instance_Private_0_1_Thunk(); |
326 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) | 326 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) |
327 return ::ppapi::PPB_OpenGLES2_Shared::GetInterface(); | 327 return ::ppapi::PPB_OpenGLES2_Shared::GetInterface(); |
328 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) | 328 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) |
329 return PPB_Proxy_Impl::GetInterface(); | 329 return PPB_Proxy_Impl::GetInterface(); |
330 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) | 330 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) |
331 return PPB_UMA_Private_Impl::GetInterface(); | 331 return PPB_UMA_Private_Impl::GetInterface(); |
332 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0) | 332 if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE_0_3) == 0) |
333 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk(); | 333 return ::ppapi::thunk::GetPPB_URLLoaderTrusted_0_3_Thunk(); |
334 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) | 334 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0) |
335 return PPB_Var_Deprecated_Impl::GetVarDeprecatedInterface(); | 335 return PPB_Var_Deprecated_Impl::GetVarDeprecatedInterface(); |
336 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) | 336 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0) |
337 return ::ppapi::PPB_Var_Shared::GetVarInterface1_0(); | 337 return ::ppapi::PPB_Var_Shared::GetVarInterface1_0(); |
338 if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0) | 338 if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0) |
339 return ::ppapi::PPB_Var_Shared::GetVarInterface(); | 339 return ::ppapi::PPB_Var_Shared::GetVarInterface1_1(); |
340 if (strcmp(name, PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE) == 0) | 340 if (strcmp(name, PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE) == 0) |
341 return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface(); | 341 return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface(); |
342 | 342 |
343 #ifdef ENABLE_FLAPPER_HACKS | 343 #ifdef ENABLE_FLAPPER_HACKS |
344 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) | 344 if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) |
345 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); | 345 return ::ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(); |
346 #endif // ENABLE_FLAPPER_HACKS | 346 #endif // ENABLE_FLAPPER_HACKS |
347 | 347 |
348 // Only support the testing interface when the command line switch is | 348 // Only support the testing interface when the command line switch is |
349 // specified. This allows us to prevent people from (ab)using this interface | 349 // specified. This allows us to prevent people from (ab)using this interface |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 588 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
589 if (retval != 0) { | 589 if (retval != 0) { |
590 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 590 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
591 return false; | 591 return false; |
592 } | 592 } |
593 return true; | 593 return true; |
594 } | 594 } |
595 | 595 |
596 } // namespace ppapi | 596 } // namespace ppapi |
597 } // namespace webkit | 597 } // namespace webkit |
OLD | NEW |