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 |
11 #include <deque> | 11 #include <deque> |
12 #include <memory> | 12 #include <memory> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
21 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 22 #include "net/log/net_log_source.h" |
22 #include "net/log/net_log_with_source.h" | 23 #include "net/log/net_log_with_source.h" |
23 #include "net/socket/next_proto.h" | 24 #include "net/socket/next_proto.h" |
24 #include "net/socket/ssl_client_socket.h" | 25 #include "net/socket/ssl_client_socket.h" |
25 #include "net/spdy/spdy_buffer.h" | 26 #include "net/spdy/spdy_buffer.h" |
26 #include "net/spdy/spdy_framer.h" | 27 #include "net/spdy/spdy_framer.h" |
27 #include "net/spdy/spdy_header_block.h" | 28 #include "net/spdy/spdy_header_block.h" |
28 #include "net/spdy/spdy_protocol.h" | 29 #include "net/spdy/spdy_protocol.h" |
29 #include "net/ssl/ssl_client_cert_type.h" | 30 #include "net/ssl/ssl_client_cert_type.h" |
30 #include "url/gurl.h" | 31 #include "url/gurl.h" |
31 | 32 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 // Called when SpdyStream is closed. No other delegate functions | 97 // Called when SpdyStream is closed. No other delegate functions |
97 // will be called after this is called, and the delegate must not | 98 // will be called after this is called, and the delegate must not |
98 // access the stream after this is called. Must not cause the | 99 // access the stream after this is called. Must not cause the |
99 // stream to be (re-)closed. | 100 // stream to be (re-)closed. |
100 // | 101 // |
101 // TODO(akalin): Allow this function to re-close the stream and | 102 // TODO(akalin): Allow this function to re-close the stream and |
102 // handle it gracefully. | 103 // handle it gracefully. |
103 virtual void OnClose(int status) = 0; | 104 virtual void OnClose(int status) = 0; |
104 | 105 |
| 106 virtual NetLogSource source_dependency() const = 0; |
| 107 |
105 protected: | 108 protected: |
106 virtual ~Delegate() {} | 109 virtual ~Delegate() {} |
107 | 110 |
108 private: | 111 private: |
109 DISALLOW_COPY_AND_ASSIGN(Delegate); | 112 DISALLOW_COPY_AND_ASSIGN(Delegate); |
110 }; | 113 }; |
111 | 114 |
112 // SpdyStream constructor | 115 // SpdyStream constructor |
113 SpdyStream(SpdyStreamType type, | 116 SpdyStream(SpdyStreamType type, |
114 const base::WeakPtr<SpdySession>& session, | 117 const base::WeakPtr<SpdySession>& session, |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 bool write_handler_guard_; | 524 bool write_handler_guard_; |
522 | 525 |
523 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 526 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
524 | 527 |
525 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 528 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
526 }; | 529 }; |
527 | 530 |
528 } // namespace net | 531 } // namespace net |
529 | 532 |
530 #endif // NET_SPDY_SPDY_STREAM_H_ | 533 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |