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 #ifndef NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const SSLInfo& ssl_info, | 76 const SSLInfo& ssl_info, |
77 bool fatal) OVERRIDE; | 77 bool fatal) OVERRIDE; |
78 virtual void OnError(const SocketStream* socket, int error) OVERRIDE; | 78 virtual void OnError(const SocketStream* socket, int error) OVERRIDE; |
79 | 79 |
80 // SpdyWebSocketStream::Delegate methods. | 80 // SpdyWebSocketStream::Delegate methods. |
81 virtual void OnCreatedSpdyStream(int status) OVERRIDE; | 81 virtual void OnCreatedSpdyStream(int status) OVERRIDE; |
82 virtual void OnSentSpdyHeaders() OVERRIDE; | 82 virtual void OnSentSpdyHeaders() OVERRIDE; |
83 virtual int OnReceivedSpdyResponseHeader( | 83 virtual int OnReceivedSpdyResponseHeader( |
84 const SpdyHeaderBlock& headers, int status) OVERRIDE; | 84 const SpdyHeaderBlock& headers, int status) OVERRIDE; |
85 virtual void OnSentSpdyData(size_t bytes_sent) OVERRIDE; | 85 virtual void OnSentSpdyData(size_t bytes_sent) OVERRIDE; |
86 virtual void OnReceivedSpdyData(const char* data, int length) OVERRIDE; | 86 virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) OVERRIDE; |
87 virtual void OnCloseSpdyStream() OVERRIDE; | 87 virtual void OnCloseSpdyStream() OVERRIDE; |
88 | 88 |
89 private: | 89 private: |
90 friend class WebSocketThrottle; | 90 friend class WebSocketThrottle; |
91 friend class WebSocketJobSpdy2Test; | 91 friend class WebSocketJobSpdy2Test; |
92 friend class WebSocketJobSpdy3Test; | 92 friend class WebSocketJobSpdy3Test; |
93 virtual ~WebSocketJob(); | 93 virtual ~WebSocketJob(); |
94 | 94 |
95 bool SendHandshakeRequest(const char* data, int len); | 95 bool SendHandshakeRequest(const char* data, int len); |
96 void AddCookieHeaderAndSend(); | 96 void AddCookieHeaderAndSend(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; | 146 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; |
147 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; | 147 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); | 149 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); |
150 }; | 150 }; |
151 | 151 |
152 } // namespace | 152 } // namespace |
153 | 153 |
154 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 154 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
OLD | NEW |