| 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/resource_creation_impl.h" | 5 #include "webkit/plugins/ppapi/resource_creation_impl.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_size.h" | 7 #include "ppapi/c/pp_size.h" |
| 8 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 8 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" | 9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" |
| 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 10 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | 11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
| 12 #include "ppapi/shared_impl/var.h" | 12 #include "ppapi/shared_impl/var.h" |
| 13 #include "webkit/plugins/ppapi/common.h" | 13 #include "webkit/plugins/ppapi/common.h" |
| 14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" | 14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" |
| 15 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h" |
| 16 #include "webkit/plugins/ppapi/ppb_broker_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 17 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
| 18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 19 #include "webkit/plugins/ppapi/ppb_file_chooser_impl.h" | |
| 20 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
| 21 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 22 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 24 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" |
| 25 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 27 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" |
| 28 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 27 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 29 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" | 28 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 107 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
| 109 uint32_t size) { | 108 uint32_t size) { |
| 110 return PPB_Buffer_Impl::Create(instance, size); | 109 return PPB_Buffer_Impl::Create(instance, size); |
| 111 } | 110 } |
| 112 | 111 |
| 113 PP_Resource ResourceCreationImpl::CreateDirectoryReader( | 112 PP_Resource ResourceCreationImpl::CreateDirectoryReader( |
| 114 PP_Resource directory_ref) { | 113 PP_Resource directory_ref) { |
| 115 return PPB_DirectoryReader_Impl::Create(directory_ref); | 114 return PPB_DirectoryReader_Impl::Create(directory_ref); |
| 116 } | 115 } |
| 117 | 116 |
| 118 PP_Resource ResourceCreationImpl::CreateFileChooser( | |
| 119 PP_Instance instance, | |
| 120 PP_FileChooserMode_Dev mode, | |
| 121 const char* accept_types) { | |
| 122 return PPB_FileChooser_Impl::Create(instance, mode, accept_types); | |
| 123 } | |
| 124 | |
| 125 PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) { | 117 PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) { |
| 126 return (new PPB_FileIO_Impl(instance))->GetReference(); | 118 return (new PPB_FileIO_Impl(instance))->GetReference(); |
| 127 } | 119 } |
| 128 | 120 |
| 129 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, | 121 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, |
| 130 const char* path) { | 122 const char* path) { |
| 131 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); | 123 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); |
| 132 return res ? res->GetReference() : 0; | 124 return res ? res->GetReference() : 0; |
| 133 } | 125 } |
| 134 | 126 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 wheel_delta, wheel_ticks, scroll_by_page); | 312 wheel_delta, wheel_ticks, scroll_by_page); |
| 321 } | 313 } |
| 322 | 314 |
| 323 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 315 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
| 324 PP_Instance instance) { | 316 PP_Instance instance) { |
| 325 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 317 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
| 326 } | 318 } |
| 327 | 319 |
| 328 } // namespace ppapi | 320 } // namespace ppapi |
| 329 } // namespace webkit | 321 } // namespace webkit |
| OLD | NEW |