Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: webkit/plugins/ppapi/resource_creation_impl.cc

Issue 11419131: Refactor FileIO to the new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: int32_t Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ppb_input_event_shared.h" 9 #include "ppapi/shared_impl/ppb_input_event_shared.h"
10 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 10 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
11 #include "ppapi/shared_impl/var.h" 11 #include "ppapi/shared_impl/var.h"
12 #include "webkit/plugins/ppapi/common.h" 12 #include "webkit/plugins/ppapi/common.h"
13 #include "webkit/plugins/ppapi/ppb_audio_impl.h" 13 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
14 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 14 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" 15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" 16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
17 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
18 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" 17 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
19 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" 18 #include "webkit/plugins/ppapi/ppb_file_system_impl.h"
20 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" 19 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h"
21 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 20 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
22 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" 21 #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h"
23 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 22 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
24 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h" 23 #include "webkit/plugins/ppapi/ppb_network_monitor_private_impl.h"
25 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" 24 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h"
26 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" 25 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h"
27 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" 26 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, 77 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance,
79 uint32_t size) { 78 uint32_t size) {
80 return PPB_Buffer_Impl::Create(instance, size); 79 return PPB_Buffer_Impl::Create(instance, size);
81 } 80 }
82 81
83 PP_Resource ResourceCreationImpl::CreateDirectoryReader( 82 PP_Resource ResourceCreationImpl::CreateDirectoryReader(
84 PP_Resource directory_ref) { 83 PP_Resource directory_ref) {
85 return PPB_DirectoryReader_Impl::Create(directory_ref); 84 return PPB_DirectoryReader_Impl::Create(directory_ref);
86 } 85 }
87 86
88 PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) {
89 return (new PPB_FileIO_Impl(instance))->GetReference();
90 }
91
92 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, 87 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system,
93 const char* path) { 88 const char* path) {
94 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); 89 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path);
95 return res ? res->GetReference() : 0; 90 return res ? res->GetReference() : 0;
96 } 91 }
97 92
98 PP_Resource ResourceCreationImpl::CreateFileSystem( 93 PP_Resource ResourceCreationImpl::CreateFileSystem(
99 PP_Instance instance, 94 PP_Instance instance,
100 PP_FileSystemType type) { 95 PP_FileSystemType type) {
101 return PPB_FileSystem_Impl::Create(instance, type); 96 return PPB_FileSystem_Impl::Create(instance, type);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 wheel_delta, wheel_ticks, scroll_by_page); 267 wheel_delta, wheel_ticks, scroll_by_page);
273 } 268 }
274 269
275 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( 270 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate(
276 PP_Instance instance) { 271 PP_Instance instance) {
277 return PPB_X509Certificate_Private_Impl::CreateResource(instance); 272 return PPB_X509Certificate_Private_Impl::CreateResource(instance);
278 } 273 }
279 274
280 } // namespace ppapi 275 } // namespace ppapi
281 } // namespace webkit 276 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698