| 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::CreateImageData( |
| 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, |
| 258 PPB_ImageData_Shared::ImageDataType type, |
| 266 PP_ImageDataFormat format, | 259 PP_ImageDataFormat format, |
| 267 const PP_Size* size, | 260 const PP_Size* size, |
| 268 PP_Bool init_to_zero) { | 261 PP_Bool init_to_zero) { |
| 269 // These really only are different on the host side. On the plugin side, we | 262 return PPB_ImageData_Proxy::CreateProxyResource(instance, type, |
| 270 // always request a "platform" ImageData if we're trusted, or a "NaCl" one | 263 format, *size, init_to_zero); |
| 271 // if we're untrusted (see PPB_ImageData_Proxy::CreateProxyResource()). | |
| 272 return CreateImageData(instance, format, size, init_to_zero); | |
| 273 } | 264 } |
| 274 | 265 |
| 275 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( | 266 PP_Resource ResourceCreationProxy::CreateNetworkMonitor( |
| 276 PP_Instance instance, | 267 PP_Instance instance, |
| 277 PPB_NetworkMonitor_Callback callback, | 268 PPB_NetworkMonitor_Callback callback, |
| 278 void* user_data) { | 269 void* user_data) { |
| 279 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( | 270 return PPB_NetworkMonitor_Private_Proxy::CreateProxyResource( |
| 280 instance, callback, user_data); | 271 instance, callback, user_data); |
| 281 } | 272 } |
| 282 | 273 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 400 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 410 return false; | 401 return false; |
| 411 } | 402 } |
| 412 | 403 |
| 413 Connection ResourceCreationProxy::GetConnection() { | 404 Connection ResourceCreationProxy::GetConnection() { |
| 414 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 405 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 415 } | 406 } |
| 416 | 407 |
| 417 } // namespace proxy | 408 } // namespace proxy |
| 418 } // namespace ppapi | 409 } // namespace ppapi |
| OLD | NEW |