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

Side by Side Diff: content/browser/renderer_host/pepper_tcp_socket.h

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync. Created 8 years, 10 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
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 // PepperTCPSocket is used by PepperMessageFilter to handle requests from 27 // PepperTCPSocket is used by PepperMessageFilter to handle requests from
28 // the Pepper TCP socket API (PPB_TCPSocket_Private). 28 // the Pepper TCP socket API (PPB_TCPSocket_Private).
29 class PepperTCPSocket { 29 class PepperTCPSocket {
30 public: 30 public:
31 PepperTCPSocket(PepperMessageFilter* manager, 31 PepperTCPSocket(PepperMessageFilter* manager,
32 int32 routing_id, 32 int32 routing_id,
33 uint32 plugin_dispatcher_id, 33 uint32 plugin_dispatcher_id,
34 uint32 socket_id); 34 uint32 socket_id);
35
36 // Used for creation already connected sockets. Takes ownership of
37 // |socket|.
38 PepperTCPSocket(PepperMessageFilter* manager,
39 int32 routing_id,
40 uint32 plugin_dispatcher_id,
41 uint32 socket_id,
42 net::StreamSocket* socket);
35 ~PepperTCPSocket(); 43 ~PepperTCPSocket();
36 44
37 int routing_id() { return routing_id_; } 45 int routing_id() { return routing_id_; }
38 46
39 void Connect(const std::string& host, uint16_t port); 47 void Connect(const std::string& host, uint16_t port);
40 void ConnectWithNetAddress(const PP_NetAddress_Private& net_addr); 48 void ConnectWithNetAddress(const PP_NetAddress_Private& net_addr);
41 void SSLHandshake(const std::string& server_name, uint16_t server_port); 49 void SSLHandshake(const std::string& server_name, uint16_t server_port);
42 void Read(int32 bytes_to_read); 50 void Read(int32 bytes_to_read);
43 void Write(const std::string& data); 51 void Write(const std::string& data);
44 52
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 96
89 scoped_ptr<net::StreamSocket> socket_; 97 scoped_ptr<net::StreamSocket> socket_;
90 98
91 scoped_refptr<net::IOBuffer> read_buffer_; 99 scoped_refptr<net::IOBuffer> read_buffer_;
92 scoped_refptr<net::IOBuffer> write_buffer_; 100 scoped_refptr<net::IOBuffer> write_buffer_;
93 101
94 DISALLOW_COPY_AND_ASSIGN(PepperTCPSocket); 102 DISALLOW_COPY_AND_ASSIGN(PepperTCPSocket);
95 }; 103 };
96 104
97 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_ 105 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_TCP_SOCKET_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper_tcp_server_socket.cc ('k') | content/browser/renderer_host/pepper_tcp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698