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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 int SendData(const char* data, int length); | 70 int SendData(const char* data, int length); |
71 void Close(); | 71 void Close(); |
72 | 72 |
73 // SpdyStream::Delegate | 73 // SpdyStream::Delegate |
74 virtual bool OnSendHeadersComplete(int status) OVERRIDE; | 74 virtual bool OnSendHeadersComplete(int status) OVERRIDE; |
75 virtual int OnSendBody() OVERRIDE; | 75 virtual int OnSendBody() OVERRIDE; |
76 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; | 76 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; |
77 virtual int OnResponseReceived(const SpdyHeaderBlock& response, | 77 virtual int OnResponseReceived(const SpdyHeaderBlock& response, |
78 base::Time response_time, | 78 base::Time response_time, |
79 int status) OVERRIDE; | 79 int status) OVERRIDE; |
80 virtual void OnDataReceived(const char* data, int length) OVERRIDE; | 80 virtual int OnDataReceived(const char* data, int length) OVERRIDE; |
81 virtual void OnDataSent(int length) OVERRIDE; | 81 virtual void OnDataSent(int length) OVERRIDE; |
82 virtual void OnClose(int status) OVERRIDE; | 82 virtual void OnClose(int status) OVERRIDE; |
83 | 83 |
84 private: | 84 private: |
85 friend class SpdyWebSocketStreamSpdy2Test; | 85 friend class SpdyWebSocketStreamSpdy2Test; |
86 friend class SpdyWebSocketStreamSpdy3Test; | 86 friend class SpdyWebSocketStreamSpdy3Test; |
87 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy2Test, Basic); | 87 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy2Test, Basic); |
88 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy3Test, Basic); | 88 FRIEND_TEST_ALL_PREFIXES(SpdyWebSocketStreamSpdy3Test, Basic); |
89 | 89 |
90 void OnSpdyStreamCreated(int status); | 90 void OnSpdyStreamCreated(int status); |
91 | 91 |
92 scoped_refptr<SpdyStream> stream_; | 92 scoped_refptr<SpdyStream> stream_; |
93 scoped_refptr<SpdySession> spdy_session_; | 93 scoped_refptr<SpdySession> spdy_session_; |
94 Delegate* delegate_; | 94 Delegate* delegate_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStream); | 96 DISALLOW_COPY_AND_ASSIGN(SpdyWebSocketStream); |
97 }; | 97 }; |
98 | 98 |
99 } // namespace net | 99 } // namespace net |
100 | 100 |
101 #endif // NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ | 101 #endif // NET_SPDY_SPDY_WEBSOCKET_STREAM_H_ |
OLD | NEW |