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::CreateTCPSocket1_0( |
| 330 PP_Instance instance) { |
| 331 return (new TCPSocketResource(GetConnection(), instance, |
| 332 TCP_SOCKET_VERSION_1_0))->GetReference(); |
| 333 } |
| 334 |
329 PP_Resource ResourceCreationProxy::CreateTCPSocket( | 335 PP_Resource ResourceCreationProxy::CreateTCPSocket( |
330 PP_Instance instance) { | 336 PP_Instance instance) { |
331 return (new TCPSocketResource(GetConnection(), instance))->GetReference(); | 337 return (new TCPSocketResource( |
| 338 GetConnection(), instance, TCP_SOCKET_VERSION_1_1_OR_ABOVE))-> |
| 339 GetReference(); |
332 } | 340 } |
333 | 341 |
334 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( | 342 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( |
335 PP_Instance instance) { | 343 PP_Instance instance) { |
336 return (new TCPSocketPrivateResource(GetConnection(), instance))-> | 344 return (new TCPSocketPrivateResource(GetConnection(), instance))-> |
337 GetReference(); | 345 GetReference(); |
338 } | 346 } |
339 | 347 |
340 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { | 348 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { |
341 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); | 349 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 462 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
455 return false; | 463 return false; |
456 } | 464 } |
457 | 465 |
458 Connection ResourceCreationProxy::GetConnection() { | 466 Connection ResourceCreationProxy::GetConnection() { |
459 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 467 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
460 } | 468 } |
461 | 469 |
462 } // namespace proxy | 470 } // namespace proxy |
463 } // namespace ppapi | 471 } // namespace ppapi |
OLD | NEW |