| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual void OnCreatedSpdyStream(int status) OVERRIDE; | 77 virtual void OnCreatedSpdyStream(int status) OVERRIDE; |
| 78 virtual void OnSentSpdyHeaders(int status) OVERRIDE; | 78 virtual void OnSentSpdyHeaders(int status) OVERRIDE; |
| 79 virtual int OnReceivedSpdyResponseHeader( | 79 virtual int OnReceivedSpdyResponseHeader( |
| 80 const spdy::SpdyHeaderBlock& headers, int status) OVERRIDE; | 80 const spdy::SpdyHeaderBlock& headers, int status) OVERRIDE; |
| 81 virtual void OnSentSpdyData(int amount_sent) OVERRIDE; | 81 virtual void OnSentSpdyData(int amount_sent) OVERRIDE; |
| 82 virtual void OnReceivedSpdyData(const char* data, int length) OVERRIDE; | 82 virtual void OnReceivedSpdyData(const char* data, int length) OVERRIDE; |
| 83 virtual void OnCloseSpdyStream() OVERRIDE; | 83 virtual void OnCloseSpdyStream() OVERRIDE; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 friend class WebSocketThrottle; | 86 friend class WebSocketThrottle; |
| 87 friend class WebSocketJobTest; | 87 friend class WebSocketJobSpdy2Test; |
| 88 friend class WebSocketJobSpdy3Test; |
| 88 virtual ~WebSocketJob(); | 89 virtual ~WebSocketJob(); |
| 89 | 90 |
| 90 bool SendHandshakeRequest(const char* data, int len); | 91 bool SendHandshakeRequest(const char* data, int len); |
| 91 void AddCookieHeaderAndSend(); | 92 void AddCookieHeaderAndSend(); |
| 92 void LoadCookieCallback(const std::string& cookie); | 93 void LoadCookieCallback(const std::string& cookie); |
| 93 | 94 |
| 94 void OnSentHandshakeRequest(SocketStream* socket, int amount_sent); | 95 void OnSentHandshakeRequest(SocketStream* socket, int amount_sent); |
| 95 void OnReceivedHandshakeResponse( | 96 void OnReceivedHandshakeResponse( |
| 96 SocketStream* socket, const char* data, int len); | 97 SocketStream* socket, const char* data, int len); |
| 97 void SaveCookiesAndNotifyHeaderComplete(); | 98 void SaveCookiesAndNotifyHeaderComplete(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 140 |
| 140 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; | 141 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; |
| 141 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; | 142 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; |
| 142 | 143 |
| 143 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); | 144 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 } // namespace | 147 } // namespace |
| 147 | 148 |
| 148 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 149 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
| OLD | NEW |