| 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_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
| 6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 base::WeakPtr<SpdyStreamRequest> GetNextPendingStreamRequest(); | 666 base::WeakPtr<SpdyStreamRequest> GetNextPendingStreamRequest(); |
| 667 | 667 |
| 668 // Called when there is room to create more streams (e.g., a stream | 668 // Called when there is room to create more streams (e.g., a stream |
| 669 // was closed). Processes as many pending stream requests as | 669 // was closed). Processes as many pending stream requests as |
| 670 // possible. | 670 // possible. |
| 671 void ProcessPendingStreamRequests(); | 671 void ProcessPendingStreamRequests(); |
| 672 | 672 |
| 673 bool TryCreatePushStream(SpdyStreamId stream_id, | 673 bool TryCreatePushStream(SpdyStreamId stream_id, |
| 674 SpdyStreamId associated_stream_id, | 674 SpdyStreamId associated_stream_id, |
| 675 SpdyPriority priority, | 675 SpdyPriority priority, |
| 676 const SpdyHeaderBlock& headers); | 676 SpdyHeaderBlock headers); |
| 677 | 677 |
| 678 // Close the stream pointed to by the given iterator. Note that that | 678 // Close the stream pointed to by the given iterator. Note that that |
| 679 // stream may hold the last reference to the session. | 679 // stream may hold the last reference to the session. |
| 680 void CloseActiveStreamIterator(ActiveStreamMap::iterator it, int status); | 680 void CloseActiveStreamIterator(ActiveStreamMap::iterator it, int status); |
| 681 | 681 |
| 682 // Close the stream pointed to by the given iterator. Note that that | 682 // Close the stream pointed to by the given iterator. Note that that |
| 683 // stream may hold the last reference to the session. | 683 // stream may hold the last reference to the session. |
| 684 void CloseCreatedStreamIterator(CreatedStreamSet::iterator it, int status); | 684 void CloseCreatedStreamIterator(CreatedStreamSet::iterator it, int status); |
| 685 | 685 |
| 686 // Calls EnqueueResetStreamFrame() and then | 686 // Calls EnqueueResetStreamFrame() and then |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 void OnStreamFrameData(SpdyStreamId stream_id, | 867 void OnStreamFrameData(SpdyStreamId stream_id, |
| 868 const char* data, | 868 const char* data, |
| 869 size_t len) override; | 869 size_t len) override; |
| 870 void OnStreamEnd(SpdyStreamId stream_id) override; | 870 void OnStreamEnd(SpdyStreamId stream_id) override; |
| 871 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override; | 871 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override; |
| 872 void OnSettings(bool clear_persisted) override; | 872 void OnSettings(bool clear_persisted) override; |
| 873 void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) override; | 873 void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) override; |
| 874 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override; | 874 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override; |
| 875 void OnPushPromise(SpdyStreamId stream_id, | 875 void OnPushPromise(SpdyStreamId stream_id, |
| 876 SpdyStreamId promised_stream_id, | 876 SpdyStreamId promised_stream_id, |
| 877 const SpdyHeaderBlock& headers) override; | 877 SpdyHeaderBlock headers) override; |
| 878 void OnHeaders(SpdyStreamId stream_id, | 878 void OnHeaders(SpdyStreamId stream_id, |
| 879 bool has_priority, | 879 bool has_priority, |
| 880 int weight, | 880 int weight, |
| 881 SpdyStreamId parent_stream_id, | 881 SpdyStreamId parent_stream_id, |
| 882 bool exclusive, | 882 bool exclusive, |
| 883 bool fin, | 883 bool fin, |
| 884 const SpdyHeaderBlock& headers) override; | 884 SpdyHeaderBlock headers) override; |
| 885 void OnAltSvc(SpdyStreamId stream_id, | 885 void OnAltSvc(SpdyStreamId stream_id, |
| 886 base::StringPiece origin, | 886 base::StringPiece origin, |
| 887 const SpdyAltSvcWireFormat::AlternativeServiceVector& | 887 const SpdyAltSvcWireFormat::AlternativeServiceVector& |
| 888 altsvc_vector) override; | 888 altsvc_vector) override; |
| 889 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override; | 889 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override; |
| 890 | 890 |
| 891 // SpdyFramerDebugVisitorInterface | 891 // SpdyFramerDebugVisitorInterface |
| 892 void OnSendCompressedFrame(SpdyStreamId stream_id, | 892 void OnSendCompressedFrame(SpdyStreamId stream_id, |
| 893 SpdyFrameType type, | 893 SpdyFrameType type, |
| 894 size_t payload_len, | 894 size_t payload_len, |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 // Used for posting asynchronous IO tasks. We use this even though | 1201 // Used for posting asynchronous IO tasks. We use this even though |
| 1202 // SpdySession is refcounted because we don't need to keep the SpdySession | 1202 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1203 // alive if the last reference is within a RunnableMethod. Just revoke the | 1203 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1204 // method. | 1204 // method. |
| 1205 base::WeakPtrFactory<SpdySession> weak_factory_; | 1205 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1206 }; | 1206 }; |
| 1207 | 1207 |
| 1208 } // namespace net | 1208 } // namespace net |
| 1209 | 1209 |
| 1210 #endif // NET_SPDY_SPDY_SESSION_H_ | 1210 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |