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_scrollbar_impl.h" | 14 #include "content/renderer/pepper/ppb_scrollbar_impl.h" |
16 #include "content/renderer/pepper/ppb_video_decoder_impl.h" | 15 #include "content/renderer/pepper/ppb_video_decoder_impl.h" |
17 #include "ppapi/c/pp_size.h" | 16 #include "ppapi/c/pp_size.h" |
18 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 17 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
19 #include "ppapi/shared_impl/ppb_audio_shared.h" | 18 #include "ppapi/shared_impl/ppb_audio_shared.h" |
20 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 19 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
21 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 20 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 73 |
75 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { | 74 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { |
76 return (new PPB_Broker_Impl(instance))->GetReference(); | 75 return (new PPB_Broker_Impl(instance))->GetReference(); |
77 } | 76 } |
78 | 77 |
79 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, | 78 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, |
80 uint32_t size) { | 79 uint32_t size) { |
81 return PPB_Buffer_Impl::Create(instance, size); | 80 return PPB_Buffer_Impl::Create(instance, size); |
82 } | 81 } |
83 | 82 |
84 PP_Resource ResourceCreationImpl::CreateFileRef( | |
85 PP_Instance instance, | |
86 PP_Resource file_system, | |
87 const char* path) { | |
88 PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal( | |
89 instance, file_system, path); | |
90 return res ? res->GetReference() : 0; | |
91 } | |
92 | |
93 PP_Resource ResourceCreationImpl::CreateFileRef( | |
94 const ppapi::PPB_FileRef_CreateInfo& serialized) { | |
95 // When we're in-process, the host resource in the create info *is* the | |
96 // resource, so we don't need to do anything. | |
97 return serialized.resource.host_resource(); | |
98 } | |
99 | |
100 PP_Resource ResourceCreationImpl::CreateFlashDRM(PP_Instance instance) { | 83 PP_Resource ResourceCreationImpl::CreateFlashDRM(PP_Instance instance) { |
101 return 0; // Not supported in-process. | 84 return 0; // Not supported in-process. |
102 } | 85 } |
103 | 86 |
104 PP_Resource ResourceCreationImpl::CreateFlashFontFile( | 87 PP_Resource ResourceCreationImpl::CreateFlashFontFile( |
105 PP_Instance instance, | 88 PP_Instance instance, |
106 const PP_BrowserFont_Trusted_Description* description, | 89 const PP_BrowserFont_Trusted_Description* description, |
107 PP_PrivateFontCharset charset) { | 90 PP_PrivateFontCharset charset) { |
108 return 0; // Not supported in-process. | 91 return 0; // Not supported in-process. |
109 } | 92 } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, | 293 ppapi::OBJECT_IS_IMPL, instance, time_stamp, modifiers, |
311 wheel_delta, wheel_ticks, scroll_by_page); | 294 wheel_delta, wheel_ticks, scroll_by_page); |
312 } | 295 } |
313 | 296 |
314 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 297 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
315 PP_Instance instance) { | 298 PP_Instance instance) { |
316 return 0; // Not supported in-process. | 299 return 0; // Not supported in-process. |
317 } | 300 } |
318 | 301 |
319 } // namespace content | 302 } // namespace content |
OLD | NEW |