OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_STREAMS_STREAM_H_ | 5 #ifndef CONTENT_BROWSER_STREAMS_STREAM_H_ |
6 #define CONTENT_BROWSER_STREAMS_STREAM_H_ | 6 #define CONTENT_BROWSER_STREAMS_STREAM_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void OnDataAvailable(); | 87 void OnDataAvailable(); |
88 | 88 |
89 size_t data_bytes_read_; | 89 size_t data_bytes_read_; |
90 bool can_add_data_; | 90 bool can_add_data_; |
91 | 91 |
92 GURL url_; | 92 GURL url_; |
93 | 93 |
94 scoped_refptr<net::IOBuffer> data_; | 94 scoped_refptr<net::IOBuffer> data_; |
95 size_t data_length_; | 95 size_t data_length_; |
96 | 96 |
97 scoped_ptr<ByteStreamWriter> writer_; | 97 scoped_ptr<ByteStreamWriter<bool> > writer_; |
98 scoped_ptr<ByteStreamReader> reader_; | 98 scoped_ptr<ByteStreamReader<bool> > reader_; |
99 | 99 |
100 StreamRegistry* registry_; | 100 StreamRegistry* registry_; |
101 StreamReadObserver* read_observer_; | 101 StreamReadObserver* read_observer_; |
102 StreamWriteObserver* write_observer_; | 102 StreamWriteObserver* write_observer_; |
103 | 103 |
104 StreamHandleImpl* stream_handle_; | 104 StreamHandleImpl* stream_handle_; |
105 | 105 |
106 base::WeakPtrFactory<Stream> weak_ptr_factory_; | 106 base::WeakPtrFactory<Stream> weak_ptr_factory_; |
107 DISALLOW_COPY_AND_ASSIGN(Stream); | 107 DISALLOW_COPY_AND_ASSIGN(Stream); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace content | 110 } // namespace content |
111 | 111 |
112 #endif // CONTENT_BROWSER_STREAMS_STREAM_H_ | 112 #endif // CONTENT_BROWSER_STREAMS_STREAM_H_ |
OLD | NEW |