| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // posted on the current MessageLoop to replay everything the server has sent. | 474 // posted on the current MessageLoop to replay everything the server has sent. |
| 475 // From the perspective of SpdyStream's state machine, headers, data, and | 475 // From the perspective of SpdyStream's state machine, headers, data, and |
| 476 // FIN states received prior to the delegate being attached have not yet been | 476 // FIN states received prior to the delegate being attached have not yet been |
| 477 // read. While buffered by |pending_recv_data_| it's not until | 477 // read. While buffered by |pending_recv_data_| it's not until |
| 478 // PushedStreamReplay() is invoked that reads are considered | 478 // PushedStreamReplay() is invoked that reads are considered |
| 479 // to have occurred, driving the state machine forward. | 479 // to have occurred, driving the state machine forward. |
| 480 void PushedStreamReplay(); | 480 void PushedStreamReplay(); |
| 481 | 481 |
| 482 // Produces the SYN_STREAM frame for the stream. The stream must | 482 // Produces the SYN_STREAM frame for the stream. The stream must |
| 483 // already be activated. | 483 // already be activated. |
| 484 scoped_ptr<SpdyFrame> ProduceSynStreamFrame(); | 484 scoped_ptr<SpdySerializedFrame> ProduceSynStreamFrame(); |
| 485 | 485 |
| 486 // Produce the initial HEADER frame for the stream with the given | 486 // Produce the initial HEADER frame for the stream with the given |
| 487 // block. The stream must already be activated. | 487 // block. The stream must already be activated. |
| 488 scoped_ptr<SpdyFrame> ProduceHeaderFrame( | 488 scoped_ptr<SpdySerializedFrame> ProduceHeaderFrame( |
| 489 scoped_ptr<SpdyHeaderBlock> header_block); | 489 scoped_ptr<SpdyHeaderBlock> header_block); |
| 490 | 490 |
| 491 // Queues the send for next frame of the remaining data in | 491 // Queues the send for next frame of the remaining data in |
| 492 // |pending_send_data_|. Must be called only when | 492 // |pending_send_data_|. Must be called only when |
| 493 // |pending_send_data_| is set. | 493 // |pending_send_data_| is set. |
| 494 void QueueNextDataFrame(); | 494 void QueueNextDataFrame(); |
| 495 | 495 |
| 496 // Merge the given headers into |response_headers_| and calls | 496 // Merge the given headers into |response_headers_| and calls |
| 497 // OnResponseHeadersUpdated() on the delegate (if attached). | 497 // OnResponseHeadersUpdated() on the delegate (if attached). |
| 498 // Returns a status code; if it is an error, the stream was closed | 498 // Returns a status code; if it is an error, the stream was closed |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 bool write_handler_guard_; | 587 bool write_handler_guard_; |
| 588 | 588 |
| 589 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 589 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
| 590 | 590 |
| 591 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 591 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
| 592 }; | 592 }; |
| 593 | 593 |
| 594 } // namespace net | 594 } // namespace net |
| 595 | 595 |
| 596 #endif // NET_SPDY_SPDY_STREAM_H_ | 596 #endif // NET_SPDY_SPDY_STREAM_H_ |
| OLD | NEW |