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

Side by Side Diff: content/renderer/p2p/socket_dispatcher.h

Issue 365903007: Handle unresolved remote hostname for TCP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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 // P2PSocketDispatcher is a per-renderer object that dispatchers all 5 // P2PSocketDispatcher is a per-renderer object that dispatchers all
6 // P2P messages received from the browser and relays all P2P messages 6 // P2P messages received from the browser and relays all P2P messages
7 // sent to the browser. P2PSocketClient instances register themselves 7 // sent to the browser. P2PSocketClient instances register themselves
8 // with the dispatcher using RegisterClient() and UnregisterClient(). 8 // with the dispatcher using RegisterClient() and UnregisterClient().
9 // 9 //
10 // Relationship of classes. 10 // Relationship of classes.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void SendP2PMessage(IPC::Message* msg); 87 void SendP2PMessage(IPC::Message* msg);
88 88
89 // Called by DnsRequest. 89 // Called by DnsRequest.
90 int RegisterHostAddressRequest(P2PAsyncAddressResolver* request); 90 int RegisterHostAddressRequest(P2PAsyncAddressResolver* request);
91 void UnregisterHostAddressRequest(int id); 91 void UnregisterHostAddressRequest(int id);
92 92
93 // Incoming message handlers. 93 // Incoming message handlers.
94 void OnNetworkListChanged(const net::NetworkInterfaceList& networks); 94 void OnNetworkListChanged(const net::NetworkInterfaceList& networks);
95 void OnGetHostAddressResult(int32 request_id, 95 void OnGetHostAddressResult(int32 request_id,
96 const net::IPAddressList& addresses); 96 const net::IPAddressList& addresses);
97 void OnSocketCreated(int socket_id, const net::IPEndPoint& address); 97 void OnSocketCreated(int socket_id, const net::IPEndPoint& address,
Sergey Ulanov 2014/07/03 03:31:06 one argument per line please when all of them don'
Mallinath (Gone from Chromium) 2014/07/07 17:56:45 Done.
98 const net::IPEndPoint& remote_address);
98 void OnIncomingTcpConnection(int socket_id, const net::IPEndPoint& address); 99 void OnIncomingTcpConnection(int socket_id, const net::IPEndPoint& address);
99 void OnSendComplete(int socket_id); 100 void OnSendComplete(int socket_id);
100 void OnError(int socket_id); 101 void OnError(int socket_id);
101 void OnDataReceived(int socket_id, const net::IPEndPoint& address, 102 void OnDataReceived(int socket_id, const net::IPEndPoint& address,
102 const std::vector<char>& data, 103 const std::vector<char>& data,
103 const base::TimeTicks& timestamp); 104 const base::TimeTicks& timestamp);
104 105
105 P2PSocketClientImpl* GetClient(int socket_id); 106 P2PSocketClientImpl* GetClient(int socket_id);
106 107
107 scoped_refptr<base::MessageLoopProxy> message_loop_; 108 scoped_refptr<base::MessageLoopProxy> message_loop_;
108 IDMap<P2PSocketClientImpl> clients_; 109 IDMap<P2PSocketClientImpl> clients_;
109 110
110 IDMap<P2PAsyncAddressResolver> host_address_requests_; 111 IDMap<P2PAsyncAddressResolver> host_address_requests_;
111 112
112 bool network_notifications_started_; 113 bool network_notifications_started_;
113 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> > 114 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> >
114 network_list_observers_; 115 network_list_observers_;
115 116
116 IPC::Sender* sender_; 117 IPC::Sender* sender_;
117 118
118 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher); 119 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher);
119 }; 120 };
120 121
121 } // namespace content 122 } // namespace content
122 123
123 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_ 124 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698