| 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 "content/renderer/pepper/resource_creation_impl.h" | 5 #include "content/renderer/pepper/resource_creation_impl.h" |
| 6 | 6 |
| 7 #include "content/renderer/pepper/common.h" | 7 #include "content/renderer/pepper/common.h" |
| 8 #include "content/renderer/pepper/ppb_audio_impl.h" | 8 #include "content/renderer/pepper/ppb_audio_impl.h" |
| 9 #include "content/renderer/pepper/ppb_broker_impl.h" | 9 #include "content/renderer/pepper/ppb_broker_impl.h" |
| 10 #include "content/renderer/pepper/ppb_buffer_impl.h" | 10 #include "content/renderer/pepper/ppb_buffer_impl.h" |
| 11 #include "content/renderer/pepper/ppb_file_ref_impl.h" | |
| 12 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" | 11 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" |
| 13 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" | 12 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
| 14 #include "content/renderer/pepper/ppb_image_data_impl.h" | 13 #include "content/renderer/pepper/ppb_image_data_impl.h" |
| 15 #include "content/renderer/pepper/ppb_network_monitor_private_impl.h" | 14 #include "content/renderer/pepper/ppb_network_monitor_private_impl.h" |
| 16 #include "content/renderer/pepper/ppb_scrollbar_impl.h" | 15 #include "content/renderer/pepper/ppb_scrollbar_impl.h" |
| 17 #include "content/renderer/pepper/ppb_video_decoder_impl.h" | 16 #include "content/renderer/pepper/ppb_video_decoder_impl.h" |
| 18 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" | 17 #include "content/renderer/pepper/ppb_x509_certificate_private_impl.h" |
| 19 #include "ppapi/c/pp_size.h" | 18 #include "ppapi/c/pp_size.h" |
| 20 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 19 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 21 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 20 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 63 |
| 65 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { | 64 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { |
| 66 return (new PPB_Broker_Impl(instance))->GetReference(); | 65 return (new PPB_Broker_Impl(instance))->GetReference(); |
| 67 } | 66 } |
| 68 | 67 |
| 69 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 68 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
| 70 uint32_t size) { | 69 uint32_t size) { |
| 71 return PPB_Buffer_Impl::Create(instance, size); | 70 return PPB_Buffer_Impl::Create(instance, size); |
| 72 } | 71 } |
| 73 | 72 |
| 74 PP_Resource ResourceCreationImpl::CreateFileRef( | |
| 75 PP_Instance instance, | |
| 76 PP_Resource file_system, | |
| 77 const char* path) { | |
| 78 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal( | |
| 79 instance, file_system, path); | |
| 80 return res ? res->GetReference() : 0; | |
| 81 } | |
| 82 | |
| 83 PP_Resource ResourceCreationImpl::CreateFileRef( | |
| 84 const ppapi::PPB_FileRef_CreateInfo& serialized) { | |
| 85 // When we're in-process, the host resource in the create info *is* the | |
| 86 // resource, so we don't need to do anything. | |
| 87 return serialized.resource.host_resource(); | |
| 88 } | |
| 89 | |
| 90 PP_Resource ResourceCreationImpl::CreateFlashDRM(PP_Instance instance) { | 73 PP_Resource ResourceCreationImpl::CreateFlashDRM(PP_Instance instance) { |
| 91 return 0; // Not supported in-process. | 74 return 0; // Not supported in-process. |
| 92 } | 75 } |
| 93 | 76 |
| 94 PP_Resource ResourceCreationImpl::CreateFlashFontFile( | 77 PP_Resource ResourceCreationImpl::CreateFlashFontFile( |
| 95 PP_Instance instance, | 78 PP_Instance instance, |
| 96 const PP_BrowserFont_Trusted_Description* description, | 79 const PP_BrowserFont_Trusted_Description* description, |
| 97 PP_PrivateFontCharset charset) { | 80 PP_PrivateFontCharset charset) { |
| 98 return 0; // Not supported in-process. | 81 return 0; // Not supported in-process. |
| 99 } | 82 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 280 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
| 298 wheel_delta, wheel_ticks, scroll_by_page); | 281 wheel_delta, wheel_ticks, scroll_by_page); |
| 299 } | 282 } |
| 300 | 283 |
| 301 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 284 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
| 302 PP_Instance instance) { | 285 PP_Instance instance) { |
| 303 return PPB_X509Certificate_Private_Impl::CreateResource(instance); | 286 return PPB_X509Certificate_Private_Impl::CreateResource(instance); |
| 304 } | 287 } |
| 305 | 288 |
| 306 } // namespace content | 289 } // namespace content |
| OLD | NEW |