Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1101)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 24195004: PPB_TCPSocket: add support for TCP server socket operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/tcp_socket_private_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 PP_Resource ResourceCreationProxy::CreatePrinting(PP_Instance instance) { 316 PP_Resource ResourceCreationProxy::CreatePrinting(PP_Instance instance) {
317 return (new PrintingResource(GetConnection(), instance))->GetReference(); 317 return (new PrintingResource(GetConnection(), instance))->GetReference();
318 } 318 }
319 319
320 PP_Resource ResourceCreationProxy::CreateTCPServerSocketPrivate( 320 PP_Resource ResourceCreationProxy::CreateTCPServerSocketPrivate(
321 PP_Instance instance) { 321 PP_Instance instance) {
322 return (new TCPServerSocketPrivateResource(GetConnection(), instance))-> 322 return (new TCPServerSocketPrivateResource(GetConnection(), instance))->
323 GetReference(); 323 GetReference();
324 } 324 }
325 325
326 PP_Resource ResourceCreationProxy::CreateTCPSocket1_0(
327 PP_Instance instance) {
328 return (new TCPSocketResource(GetConnection(), instance,
329 TCP_SOCKET_VERSION_1_0))->GetReference();
330 }
331
326 PP_Resource ResourceCreationProxy::CreateTCPSocket( 332 PP_Resource ResourceCreationProxy::CreateTCPSocket(
327 PP_Instance instance) { 333 PP_Instance instance) {
328 return (new TCPSocketResource(GetConnection(), instance))->GetReference(); 334 return (new TCPSocketResource(
335 GetConnection(), instance, TCP_SOCKET_VERSION_1_1_OR_ABOVE))->
336 GetReference();
329 } 337 }
330 338
331 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( 339 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate(
332 PP_Instance instance) { 340 PP_Instance instance) {
333 return (new TCPSocketPrivateResource(GetConnection(), instance))-> 341 return (new TCPSocketPrivateResource(GetConnection(), instance))->
334 GetReference(); 342 GetReference();
335 } 343 }
336 344
337 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) { 345 PP_Resource ResourceCreationProxy::CreateUDPSocket(PP_Instance instance) {
338 return (new UDPSocketResource(GetConnection(), instance))->GetReference(); 346 return (new UDPSocketResource(GetConnection(), instance))->GetReference();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 465 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
458 return false; 466 return false;
459 } 467 }
460 468
461 Connection ResourceCreationProxy::GetConnection() { 469 Connection ResourceCreationProxy::GetConnection() {
462 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 470 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
463 } 471 }
464 472
465 } // namespace proxy 473 } // namespace proxy
466 } // namespace ppapi 474 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/tcp_socket_private_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698