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/connection.h" | 10 #include "ppapi/proxy/connection.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 PP_Resource ResourceCreationProxy::CreatePrinting(PP_Instance instance) { | 319 PP_Resource ResourceCreationProxy::CreatePrinting(PP_Instance instance) { |
320 return (new PrintingResource(GetConnection(), instance))->GetReference(); | 320 return (new PrintingResource(GetConnection(), instance))->GetReference(); |
321 } | 321 } |
322 | 322 |
323 PP_Resource ResourceCreationProxy::CreateTCPServerSocketPrivate( | 323 PP_Resource ResourceCreationProxy::CreateTCPServerSocketPrivate( |
324 PP_Instance instance) { | 324 PP_Instance instance) { |
325 return (new TCPServerSocketPrivateResource(GetConnection(), instance))-> | 325 return (new TCPServerSocketPrivateResource(GetConnection(), instance))-> |
326 GetReference(); | 326 GetReference(); |
327 } | 327 } |
328 | 328 |
329 PP_Resource ResourceCreationProxy::CreateTCPSocket( | 329 PP_Resource ResourceCreationProxy::CreateTCPSocket1_0( |
330 PP_Instance instance) { | 330 PP_Instance instance) { |
331 return (new TCPSocketResource(GetConnection(), instance))->GetReference(); | 331 return (new TCPSocketResource(GetConnection(), instance))->GetReference(); |
332 } | 332 } |
333 | 333 |
| 334 PP_Resource ResourceCreationProxy::CreateTCPSocket( |
| 335 PP_Instance instance, |
| 336 PP_NetAddress_Family family) { |
| 337 if (family == PP_NETADDRESS_FAMILY_UNSPECIFIED) |
| 338 return 0; |
| 339 return (new TCPSocketResource(GetConnection(), instance, family))-> |
| 340 GetReference(); |
| 341 } |
| 342 |
334 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( | 343 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( |
335 PP_Instance instance) { | 344 PP_Instance instance) { |
336 return (new TCPSocketPrivateResource(GetConnection(), instance))-> | 345 return (new TCPSocketPrivateResource(GetConnection(), instance))-> |
337 GetReference(); | 346 GetReference(); |
338 } | 347 } |
339 | 348 |
340 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { | 349 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { |
341 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); | 350 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); |
342 } | 351 } |
343 | 352 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 463 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
455 return false; | 464 return false; |
456 } | 465 } |
457 | 466 |
458 Connection ResourceCreationProxy::GetConnection() { | 467 Connection ResourceCreationProxy::GetConnection() { |
459 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 468 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
460 } | 469 } |
461 | 470 |
462 } // namespace proxy | 471 } // namespace proxy |
463 } // namespace ppapi | 472 } // namespace ppapi |
OLD | NEW |