| Index: content/browser/streams/stream.h
|
| diff --git a/content/browser/streams/stream.h b/content/browser/streams/stream.h
|
| index 3aa389c8d96326868fcdda340d44d85db55f85cc..d6cd3b8e9430f256c938074f9fb64873f536f464 100644
|
| --- a/content/browser/streams/stream.h
|
| +++ b/content/browser/streams/stream.h
|
| @@ -18,6 +18,8 @@ class IOBuffer;
|
|
|
| namespace content {
|
|
|
| +class StreamHandle;
|
| +class StreamHandleImpl;
|
| class StreamReadObserver;
|
| class StreamRegistry;
|
| class StreamWriteObserver;
|
| @@ -49,6 +51,9 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> {
|
| // Removes the read observer. |observer| must be the current observer.
|
| void RemoveReadObserver(StreamReadObserver* observer);
|
|
|
| + // Removes the write observer. |observer| must be the current observer.
|
| + void RemoveWriteObserver(StreamWriteObserver* observer);
|
| +
|
| // Adds the data in |buffer| to the stream. Takes ownership of |buffer|.
|
| void AddData(scoped_refptr<net::IOBuffer> buffer, size_t size);
|
|
|
| @@ -61,6 +66,10 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> {
|
| // and STREAM_COMPLETE if the stream is finalized and all data has been read.
|
| StreamState ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read);
|
|
|
| + scoped_ptr<StreamHandle> CreateHandle(const GURL& original_url,
|
| + const std::string& mime_type);
|
| + void CloseHandle();
|
| +
|
| // Indicates whether there is space in the buffer to add more data.
|
| bool can_add_data() const { return can_add_data_; }
|
|
|
| @@ -92,6 +101,8 @@ class CONTENT_EXPORT Stream : public base::RefCountedThreadSafe<Stream> {
|
| StreamReadObserver* read_observer_;
|
| StreamWriteObserver* write_observer_;
|
|
|
| + StreamHandleImpl* stream_handle_;
|
| +
|
| base::WeakPtrFactory<Stream> weak_ptr_factory_;
|
| DISALLOW_COPY_AND_ASSIGN(Stream);
|
| };
|
|
|