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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 PP_Instance instance, | 218 PP_Instance instance, |
219 PP_FileChooserMode_Dev mode, | 219 PP_FileChooserMode_Dev mode, |
220 const PP_Var& accept_types) { | 220 const PP_Var& accept_types) { |
221 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types); | 221 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types); |
222 std::string str = string_var ? string_var->value() : std::string(); | 222 std::string str = string_var ? string_var->value() : std::string(); |
223 return (new FileChooserResource(GetConnection(), instance, mode, | 223 return (new FileChooserResource(GetConnection(), instance, mode, |
224 str.c_str()))->GetReference(); | 224 str.c_str()))->GetReference(); |
225 } | 225 } |
226 | 226 |
227 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, | 227 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, |
228 const PP_Size& size, | 228 const PP_Size* size, |
229 PP_Bool is_always_opaque) { | 229 PP_Bool is_always_opaque) { |
230 return (new Graphics2DResource(GetConnection(), instance, size, | 230 return (new Graphics2DResource(GetConnection(), instance, *size, |
231 is_always_opaque))->GetReference(); | 231 is_always_opaque))->GetReference(); |
232 } | 232 } |
233 | 233 |
234 PP_Resource ResourceCreationProxy::CreateGraphics3D( | 234 PP_Resource ResourceCreationProxy::CreateGraphics3D( |
235 PP_Instance instance, | 235 PP_Instance instance, |
236 PP_Resource share_context, | 236 PP_Resource share_context, |
237 const int32_t* attrib_list) { | 237 const int32_t* attrib_list) { |
238 return PPB_Graphics3D_Proxy::CreateProxyResource( | 238 return PPB_Graphics3D_Proxy::CreateProxyResource( |
239 instance, share_context, attrib_list); | 239 instance, share_context, attrib_list); |
240 } | 240 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
400 return false; | 400 return false; |
401 } | 401 } |
402 | 402 |
403 Connection ResourceCreationProxy::GetConnection() { | 403 Connection ResourceCreationProxy::GetConnection() { |
404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
405 } | 405 } |
406 | 406 |
407 } // namespace proxy | 407 } // namespace proxy |
408 } // namespace ppapi | 408 } // namespace ppapi |
OLD | NEW |