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/file_chooser_resource.h" | 10 #include "ppapi/proxy/file_chooser_resource.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 | 183 |
184 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, | 184 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, |
185 PP_ImageDataFormat format, | 185 PP_ImageDataFormat format, |
186 const PP_Size& size, | 186 const PP_Size& size, |
187 PP_Bool init_to_zero) { | 187 PP_Bool init_to_zero) { |
188 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size, | 188 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, size, |
189 init_to_zero); | 189 init_to_zero); |
190 } | 190 } |
191 | 191 |
| 192 PP_Resource ResourceCreationProxy::CreateImageDataNaCl( |
| 193 PP_Instance instance, |
| 194 PP_ImageDataFormat format, |
| 195 const PP_Size& size, |
| 196 PP_Bool init_to_zero) { |
| 197 // These really only are different on the host side. On the plugin side, we |
| 198 // always request a "platform" ImageData if we're trusted, or a "NaCl" one |
| 199 // if we're untrusted (see PPB_ImageData_Proxy::CreateProxyResource()). |
| 200 return CreateImageData(instance, format, size, init_to_zero); |
| 201 } |
| 202 |
192 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, | 203 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, |
193 const PP_Size& size, | 204 const PP_Size& size, |
194 PP_Bool is_always_opaque) { | 205 PP_Bool is_always_opaque) { |
195 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, | 206 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, |
196 is_always_opaque); | 207 is_always_opaque); |
197 } | 208 } |
198 | 209 |
199 #if !defined(OS_NACL) | 210 #if !defined(OS_NACL) |
200 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( | 211 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( |
201 PP_Instance instance, | 212 PP_Instance instance, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 360 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
350 return dispatcher()->Send(msg); | 361 return dispatcher()->Send(msg); |
351 } | 362 } |
352 | 363 |
353 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 364 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
354 return false; | 365 return false; |
355 } | 366 } |
356 | 367 |
357 } // namespace proxy | 368 } // namespace proxy |
358 } // namespace ppapi | 369 } // namespace ppapi |
OLD | NEW |