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_SPDY_SPDY_WEBSOCKET_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ |
6 #define NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ | 6 #define NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const BoundNetLog& stream_net_log); | 68 const BoundNetLog& stream_net_log); |
69 | 69 |
70 int SendRequest(const linked_ptr<SpdyHeaderBlock>& headers); | 70 int SendRequest(const linked_ptr<SpdyHeaderBlock>& headers); |
71 int SendData(const char* data, int length); | 71 int SendData(const char* data, int length); |
72 void Close(); | 72 void Close(); |
73 | 73 |
74 // SpdyStream::Delegate | 74 // SpdyStream::Delegate |
75 virtual bool OnSendHeadersComplete(int status) OVERRIDE; | 75 virtual bool OnSendHeadersComplete(int status) OVERRIDE; |
76 virtual int OnSendBody() OVERRIDE; | 76 virtual int OnSendBody() OVERRIDE; |
77 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; | 77 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; |
| 78 virtual int OnSendChunkedBody() OVERRIDE; |
| 79 virtual int OnSendChunkedBodyComplete(int status, bool* eof) OVERRIDE; |
78 virtual int OnResponseReceived(const SpdyHeaderBlock& response, | 80 virtual int OnResponseReceived(const SpdyHeaderBlock& response, |
79 base::Time response_time, | 81 base::Time response_time, |
80 int status) OVERRIDE; | 82 int status) OVERRIDE; |
81 virtual void OnDataReceived(const char* data, int length) OVERRIDE; | 83 virtual void OnDataReceived(const char* data, int length) OVERRIDE; |
82 virtual void OnDataSent(int length) OVERRIDE; | 84 virtual void OnDataSent(int length) OVERRIDE; |
83 virtual void OnClose(int status) OVERRIDE; | 85 virtual void OnClose(int status) OVERRIDE; |
84 virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE; | 86 virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE; |
| 87 virtual bool IsRequestBodyChunked() OVERRIDE; |
85 | 88 |
86 private: | 89 private: |
87 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy2Test, Basic); | 90 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy2Test, Basic); |
88 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy3Test, Basic); | 91 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy3Test, Basic); |
89 | 92 |
90 void OnSpdyStreamCreated(int status); | 93 void OnSpdyStreamCreated(int status); |
91 | 94 |
92 scoped_refptr<SpdyStream> stream_; | 95 scoped_refptr<SpdyStream> stream_; |
93 scoped_refptr<SpdySession> spdy_session_; | 96 scoped_refptr<SpdySession> spdy_session_; |
94 Delegate* delegate_; | 97 Delegate* delegate_; |
95 | 98 |
96 DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStream); | 99 DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStream); |
97 }; | 100 }; |
98 | 101 |
99 } // namespace net | 102 } // namespace net |
100 | 103 |
101 #endif // NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ | 104 #endif // NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ |
OLD | NEW |