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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // TODO(brettw) put these in a hash map for better performance. | 289 // TODO(brettw) put these in a hash map for better performance. |
290 #define UNPROXIED_IFACE(api_name, iface_str, iface_struct) \ | 290 #define UNPROXIED_IFACE(api_name, iface_str, iface_struct) \ |
291 if (strcmp(name, iface_str) == 0) \ | 291 if (strcmp(name, iface_str) == 0) \ |
292 return ::ppapi::thunk::Get##iface_struct##_Thunk(); | 292 return ::ppapi::thunk::Get##iface_struct##_Thunk(); |
293 #define PROXIED_IFACE(api_name, iface_str, iface_struct) \ | 293 #define PROXIED_IFACE(api_name, iface_str, iface_struct) \ |
294 UNPROXIED_IFACE(api_name, iface_str, iface_struct) | 294 UNPROXIED_IFACE(api_name, iface_str, iface_struct) |
295 | 295 |
296 #include "ppapi/thunk/interfaces_ppb_public_stable.h" | 296 #include "ppapi/thunk/interfaces_ppb_public_stable.h" |
297 #include "ppapi/thunk/interfaces_ppb_public_dev.h" | 297 #include "ppapi/thunk/interfaces_ppb_public_dev.h" |
298 #include "ppapi/thunk/interfaces_ppb_private.h" | 298 #include "ppapi/thunk/interfaces_ppb_private.h" |
| 299 #include "ppapi/thunk/interfaces_ppb_private_flash.h" |
299 | 300 |
300 #undef UNPROXIED_API | 301 #undef UNPROXIED_API |
301 #undef PROXIED_IFACE | 302 #undef PROXIED_IFACE |
302 | 303 |
303 // Please keep alphabetized by interface macro name with "special" stuff at | 304 // Please keep alphabetized by interface macro name with "special" stuff at |
304 // the bottom. | 305 // the bottom. |
305 if (strcmp(name, PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE_0_1) == 0) | 306 if (strcmp(name, PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE_0_1) == 0) |
306 return ::ppapi::thunk::GetPPB_AudioInputTrusted_0_1_Thunk(); | 307 return ::ppapi::thunk::GetPPB_AudioInputTrusted_0_1_Thunk(); |
307 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE_0_6) == 0) | 308 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE_0_6) == 0) |
308 return ::ppapi::thunk::GetPPB_AudioTrusted_0_6_Thunk(); | 309 return ::ppapi::thunk::GetPPB_AudioTrusted_0_6_Thunk(); |
309 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE_0_1) == 0) | 310 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE_0_1) == 0) |
310 return ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk(); | 311 return ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk(); |
311 if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) | 312 if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) |
312 return &core_interface; | 313 return &core_interface; |
313 if (strcmp(name, PPB_FLASH_INTERFACE_11_0) == 0) | |
314 return PPB_Flash_Impl::GetInterface11(); | |
315 if (strcmp(name, PPB_FLASH_INTERFACE_12_0) == 0) | |
316 return PPB_Flash_Impl::GetInterface12_0(); | |
317 if (strcmp(name, PPB_FLASH_INTERFACE_12_1) == 0) | |
318 return PPB_Flash_Impl::GetInterface12_1(); | |
319 if (strcmp(name, PPB_FLASH_INTERFACE_12_2) == 0) | |
320 return PPB_Flash_Impl::GetInterface12_2(); | |
321 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_4_0) == 0) | 314 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_4_0) == 0) |
322 return ::ppapi::thunk::GetPPB_Flash_Clipboard_4_0_Thunk(); | 315 return ::ppapi::thunk::GetPPB_Flash_Clipboard_4_0_Thunk(); |
323 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_0) == 0) | 316 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_0) == 0) |
324 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); | 317 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); |
325 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY) == 0) | 318 if (strcmp(name, PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY) == 0) |
326 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); | 319 return ::ppapi::thunk::GetPPB_Flash_Clipboard_3_0_Thunk(); |
327 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) | 320 if (strcmp(name, PPB_FLASH_FILE_FILEREF_INTERFACE) == 0) |
328 return PPB_Flash_File_FileRef_Impl::GetInterface(); | 321 return PPB_Flash_File_FileRef_Impl::GetInterface(); |
329 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) | 322 if (strcmp(name, PPB_FLASH_FILE_MODULELOCAL_INTERFACE) == 0) |
330 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); | 323 return PPB_Flash_File_ModuleLocal_Impl::GetInterface(); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 609 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
617 if (retval != 0) { | 610 if (retval != 0) { |
618 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 611 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
619 return false; | 612 return false; |
620 } | 613 } |
621 return true; | 614 return true; |
622 } | 615 } |
623 | 616 |
624 } // namespace ppapi | 617 } // namespace ppapi |
625 } // namespace webkit | 618 } // namespace webkit |
OLD | NEW |