| 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_broker_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 16 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" | 16 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" |
| 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" |
| 18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | |
| 19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 18 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 19 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 21 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" | 20 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" |
| 22 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" | 21 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
| 23 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 22 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 24 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" | 23 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" |
| 25 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | 24 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
| 26 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" | 25 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" |
| 27 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" | 26 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
| 28 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" | 27 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 91 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
| 93 uint32_t size) { | 92 uint32_t size) { |
| 94 return PPB_Buffer_Impl::Create(instance, size); | 93 return PPB_Buffer_Impl::Create(instance, size); |
| 95 } | 94 } |
| 96 | 95 |
| 97 PP_Resource ResourceCreationImpl::CreateDirectoryReader( | 96 PP_Resource ResourceCreationImpl::CreateDirectoryReader( |
| 98 PP_Resource directory_ref) { | 97 PP_Resource directory_ref) { |
| 99 return PPB_DirectoryReader_Impl::Create(directory_ref); | 98 return PPB_DirectoryReader_Impl::Create(directory_ref); |
| 100 } | 99 } |
| 101 | 100 |
| 102 PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) { | |
| 103 return (new PPB_FileIO_Impl(instance))->GetReference(); | |
| 104 } | |
| 105 | |
| 106 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, | 101 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, |
| 107 const char* path) { | 102 const char* path) { |
| 108 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); | 103 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); |
| 109 return res ? res->GetReference() : 0; | 104 return res ? res->GetReference() : 0; |
| 110 } | 105 } |
| 111 | 106 |
| 112 PP_Resource ResourceCreationImpl::CreateFileSystem( | 107 PP_Resource ResourceCreationImpl::CreateFileSystem( |
| 113 PP_Instance instance, | 108 PP_Instance instance, |
| 114 PP_FileSystemType type) { | 109 PP_FileSystemType type) { |
| 115 return PPB_FileSystem_Impl::Create(instance, type); | 110 return PPB_FileSystem_Impl::Create(instance, type); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 wheel_delta, wheel_ticks, scroll_by_page); | 288 wheel_delta, wheel_ticks, scroll_by_page); |
| 294 } | 289 } |
| 295 | 290 |
| 296 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 291 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
| 297 PP_Instance instance) { | 292 PP_Instance instance) { |
| 298 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 293 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
| 299 } | 294 } |
| 300 | 295 |
| 301 } // namespace ppapi | 296 } // namespace ppapi |
| 302 } // namespace webkit | 297 } // namespace webkit |
| OLD | NEW |