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" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 108 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
109 uint32_t size) { | 109 uint32_t size) { |
110 return PPB_Buffer_Impl::Create(instance, size); | 110 return PPB_Buffer_Impl::Create(instance, size); |
111 } | 111 } |
112 | 112 |
113 PP_Resource ResourceCreationImpl::CreateDirectoryReader( | 113 PP_Resource ResourceCreationImpl::CreateDirectoryReader( |
114 PP_Resource directory_ref) { | 114 PP_Resource directory_ref) { |
115 return PPB_DirectoryReader_Impl::Create(directory_ref); | 115 return PPB_DirectoryReader_Impl::Create(directory_ref); |
116 } | 116 } |
117 | 117 |
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) { | 118 PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) { |
126 return (new PPB_FileIO_Impl(instance))->GetReference(); | 119 return (new PPB_FileIO_Impl(instance))->GetReference(); |
127 } | 120 } |
128 | 121 |
129 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, | 122 PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system, |
130 const char* path) { | 123 const char* path) { |
131 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); | 124 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path); |
132 return res ? res->GetReference() : 0; | 125 return res ? res->GetReference() : 0; |
133 } | 126 } |
134 | 127 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 wheel_delta, wheel_ticks, scroll_by_page); | 304 wheel_delta, wheel_ticks, scroll_by_page); |
312 } | 305 } |
313 | 306 |
314 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 307 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
315 PP_Instance instance) { | 308 PP_Instance instance) { |
316 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 309 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
317 } | 310 } |
318 | 311 |
319 } // namespace ppapi | 312 } // namespace ppapi |
320 } // namespace webkit | 313 } // namespace webkit |
OLD | NEW |