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_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_STREAM_H_ |
6 #define NET_SPDY_SPDY_STREAM_H_ | 6 #define NET_SPDY_SPDY_STREAM_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Normal streams will receive a SYN_REPLY and optional HEADERS frames. | 65 // Normal streams will receive a SYN_REPLY and optional HEADERS frames. |
66 // Pushed streams will receive a SYN_STREAM and optional HEADERS frames. | 66 // Pushed streams will receive a SYN_STREAM and optional HEADERS frames. |
67 // Because a stream may have a SYN_* frame and multiple HEADERS frames, | 67 // Because a stream may have a SYN_* frame and multiple HEADERS frames, |
68 // this callback may be called multiple times. | 68 // this callback may be called multiple times. |
69 // |status| indicates network error. Returns network error code. | 69 // |status| indicates network error. Returns network error code. |
70 virtual int OnResponseReceived(const SpdyHeaderBlock& response, | 70 virtual int OnResponseReceived(const SpdyHeaderBlock& response, |
71 base::Time response_time, | 71 base::Time response_time, |
72 int status) = 0; | 72 int status) = 0; |
73 | 73 |
74 // Called when data is received. | 74 // Called when data is received. |
75 virtual void OnDataReceived(const char* data, int length) = 0; | 75 // Returns network error code. OK when it successfully receives data. |
| 76 virtual int OnDataReceived(const char* data, int length) = 0; |
76 | 77 |
77 // Called when data is sent. | 78 // Called when data is sent. |
78 virtual void OnDataSent(int length) = 0; | 79 virtual void OnDataSent(int length) = 0; |
79 | 80 |
80 // Called when SpdyStream is closed. | 81 // Called when SpdyStream is closed. |
81 virtual void OnClose(int status) = 0; | 82 virtual void OnClose(int status) = 0; |
82 | 83 |
83 protected: | 84 protected: |
84 friend class base::RefCounted<Delegate>; | 85 friend class base::RefCounted<Delegate>; |
85 virtual ~Delegate() {} | 86 virtual ~Delegate() {} |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 std::string domain_bound_private_key_; | 371 std::string domain_bound_private_key_; |
371 std::string domain_bound_cert_; | 372 std::string domain_bound_cert_; |
372 ServerBoundCertService::RequestHandle domain_bound_cert_request_handle_; | 373 ServerBoundCertService::RequestHandle domain_bound_cert_request_handle_; |
373 | 374 |
374 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 375 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
375 }; | 376 }; |
376 | 377 |
377 } // namespace net | 378 } // namespace net |
378 | 379 |
379 #endif // NET_SPDY_SPDY_STREAM_H_ | 380 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |