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/proxy/audio_input_resource.h" | 9 #include "ppapi/proxy/audio_input_resource.h" |
10 #include "ppapi/proxy/browser_font_resource_trusted.h" | 10 #include "ppapi/proxy/browser_font_resource_trusted.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // of the proxy on the host side. | 246 // of the proxy on the host side. |
247 return 0; | 247 return 0; |
248 } | 248 } |
249 | 249 |
250 PP_Resource ResourceCreationProxy::CreateHostResolverPrivate( | 250 PP_Resource ResourceCreationProxy::CreateHostResolverPrivate( |
251 PP_Instance instance) { | 251 PP_Instance instance) { |
252 return (new HostResolverPrivateResource( | 252 return (new HostResolverPrivateResource( |
253 GetConnection(), instance))->GetReference(); | 253 GetConnection(), instance))->GetReference(); |
254 } | 254 } |
255 | 255 |
256 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, | 256 PP_Resource ResourceCreationProxy::CreateImageDataPlatform( |
257 PP_ImageDataFormat format, | |
258 const PP_Size* size, | |
259 PP_Bool init_to_zero) { | |
260 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, *size, | |
261 init_to_zero); | |
262 } | |
263 | |
264 PP_Resource ResourceCreationProxy::CreateImageDataNaCl( | |
265 PP_Instance instance, | 257 PP_Instance instance, |
266 PP_ImageDataFormat format, | 258 PP_ImageDataFormat format, |
267 const PP_Size* size, | 259 const PP_Size* size, |
268 PP_Bool init_to_zero) { | 260 PP_Bool init_to_zero) { |
269 // These really only are different on the host side. On the plugin side, we | 261 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, *size, |
270 // always request a "platform" ImageData if we're trusted, or a "NaCl" one | 262 init_to_zero, |
271 // if we're untrusted (see PPB_ImageData_Proxy::CreateProxyResource()). | 263 PP_TRUE /* platform */); |
272 return CreateImageData(instance, format, size, init_to_zero); | 264 } |
| 265 |
| 266 PP_Resource ResourceCreationProxy::CreateImageDataSimple( |
| 267 PP_Instance instance, |
| 268 PP_ImageDataFormat format, |
| 269 const PP_Size* size, |
| 270 PP_Bool init_to_zero) { |
| 271 return PPB_ImageData_Proxy::CreateProxyResource(instance, format, *size, |
| 272 init_to_zero, |
| 273 PP_FALSE /* platform */); |
273 } | 274 } |
274 | 275 |
275 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( | 276 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( |
276 PP_Instance instance, | 277 PP_Instance instance, |
277 PPB_NetworkMonitor_Callback callback, | 278 PPB_NetworkMonitor_Callback callback, |
278 void* user_data) { | 279 void* user_data) { |
279 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( | 280 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( |
280 instance, callback, user_data); | 281 instance, callback, user_data); |
281 } | 282 } |
282 | 283 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 410 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
410 return false; | 411 return false; |
411 } | 412 } |
412 | 413 |
413 Connection ResourceCreationProxy::GetConnection() { | 414 Connection ResourceCreationProxy::GetConnection() { |
414 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 415 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
415 } | 416 } |
416 | 417 |
417 } // namespace proxy | 418 } // namespace proxy |
418 } // namespace ppapi | 419 } // namespace ppapi |
OLD | NEW |