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 "ppapi/proxy/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
10 #include "ppapi/proxy/audio_input_resource.h" | 10 #include "ppapi/proxy/audio_input_resource.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 PP_Instance instance, | 139 PP_Instance instance, |
140 const PP_Resource elements[], | 140 const PP_Resource elements[], |
141 uint32_t size) { | 141 uint32_t size) { |
142 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( | 142 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( |
143 OBJECT_IS_PROXY, instance, elements, size); | 143 OBJECT_IS_PROXY, instance, elements, size); |
144 return object->GetReference(); | 144 return object->GetReference(); |
145 } | 145 } |
146 | 146 |
147 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( | 147 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( |
148 PP_Instance instance, | 148 PP_Instance instance, |
149 const PP_TrueTypeFontDesc_Dev& desc) { | 149 const PP_TrueTypeFontDesc_Dev* desc) { |
150 return (new TrueTypeFontResource(GetConnection(), | 150 return (new TrueTypeFontResource(GetConnection(), |
151 instance, desc))->GetReference(); | 151 instance, *desc))->GetReference(); |
152 | 152 |
153 } | 153 } |
154 | 154 |
155 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { | 155 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { |
156 return PPB_URLLoader_Proxy::CreateProxyResource(instance); | 156 return PPB_URLLoader_Proxy::CreateProxyResource(instance); |
157 } | 157 } |
158 | 158 |
159 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( | 159 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( |
160 PP_Instance instance) { | 160 PP_Instance instance) { |
161 return (new URLRequestInfoResource( | 161 return (new URLRequestInfoResource( |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 397 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
398 return false; | 398 return false; |
399 } | 399 } |
400 | 400 |
401 Connection ResourceCreationProxy::GetConnection() { | 401 Connection ResourceCreationProxy::GetConnection() { |
402 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 402 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
403 } | 403 } |
404 | 404 |
405 } // namespace proxy | 405 } // namespace proxy |
406 } // namespace ppapi | 406 } // namespace ppapi |
OLD | NEW |