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

Side by Side Diff: net/websockets/websocket_channel.h

Issue 2397393002: Provide child/frame IDs for WebSocket handshake request (Closed)
Patch Set: fix Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ 6 #define NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 15 matching lines...) Expand all
26 #include "url/gurl.h" 26 #include "url/gurl.h"
27 27
28 namespace url { 28 namespace url {
29 class Origin; 29 class Origin;
30 } // namespace url 30 } // namespace url
31 31
32 namespace net { 32 namespace net {
33 33
34 class NetLogWithSource; 34 class NetLogWithSource;
35 class IOBuffer; 35 class IOBuffer;
36 class URLRequest;
36 class URLRequestContext; 37 class URLRequestContext;
37 struct WebSocketHandshakeRequestInfo; 38 struct WebSocketHandshakeRequestInfo;
38 struct WebSocketHandshakeResponseInfo; 39 struct WebSocketHandshakeResponseInfo;
39 class WebSocketHandshakeStreamCreateHelper; 40 class WebSocketHandshakeStreamCreateHelper;
40 41
41 // Transport-independent implementation of WebSockets. Implements protocol 42 // Transport-independent implementation of WebSockets. Implements protocol
42 // semantics that do not depend on the underlying transport. Provides the 43 // semantics that do not depend on the underlying transport. Provides the
43 // interface to the content layer. Some WebSocket concepts are used here without 44 // interface to the content layer. Some WebSocket concepts are used here without
44 // definition; please see the RFC at http://tools.ietf.org/html/rfc6455 for 45 // definition; please see the RFC at http://tools.ietf.org/html/rfc6455 for
45 // clarification. 46 // clarification.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Starts the connection process, using the supplied stream request creation 220 // Starts the connection process, using the supplied stream request creation
220 // callback. 221 // callback.
221 void SendAddChannelRequestWithSuppliedCallback( 222 void SendAddChannelRequestWithSuppliedCallback(
222 const GURL& socket_url, 223 const GURL& socket_url,
223 const std::vector<std::string>& requested_protocols, 224 const std::vector<std::string>& requested_protocols,
224 const url::Origin& origin, 225 const url::Origin& origin,
225 const GURL& first_party_for_cookies, 226 const GURL& first_party_for_cookies,
226 const std::string& additional_headers, 227 const std::string& additional_headers,
227 const WebSocketStreamRequestCreationCallback& callback); 228 const WebSocketStreamRequestCreationCallback& callback);
228 229
230 // Called when a URLRequest is created for handshaking.
231 void OnCreateURLRequest(URLRequest* request);
232
229 // Success callback from WebSocketStream::CreateAndConnectStream(). Reports 233 // Success callback from WebSocketStream::CreateAndConnectStream(). Reports
230 // success to the event interface. May delete |this|. 234 // success to the event interface. May delete |this|.
231 void OnConnectSuccess(std::unique_ptr<WebSocketStream> stream); 235 void OnConnectSuccess(std::unique_ptr<WebSocketStream> stream);
232 236
233 // Failure callback from WebSocketStream::CreateAndConnectStream(). Reports 237 // Failure callback from WebSocketStream::CreateAndConnectStream(). Reports
234 // failure to the event interface. May delete |this|. 238 // failure to the event interface. May delete |this|.
235 void OnConnectFailure(const std::string& message); 239 void OnConnectFailure(const std::string& message);
236 240
237 // SSL certificate error callback from 241 // SSL certificate error callback from
238 // WebSocketStream::CreateAndConnectStream(). Forwards the request to the 242 // WebSocketStream::CreateAndConnectStream(). Forwards the request to the
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // For UMA. The time when OnConnectSuccess() method was called and |stream_| 452 // For UMA. The time when OnConnectSuccess() method was called and |stream_|
449 // was set. 453 // was set.
450 base::TimeTicks established_on_; 454 base::TimeTicks established_on_;
451 455
452 DISALLOW_COPY_AND_ASSIGN(WebSocketChannel); 456 DISALLOW_COPY_AND_ASSIGN(WebSocketChannel);
453 }; 457 };
454 458
455 } // namespace net 459 } // namespace net
456 460
457 #endif // NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ 461 #endif // NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_
OLDNEW
« no previous file with comments | « net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698