| 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_WRITE_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_STREAMS_STREAM_WRITE_OBSERVER_H_ |
| 6 #define CONTENT_BROWSER_STREAMS_STREAM_WRITE_OBSERVER_H_ | 6 #define CONTENT_BROWSER_STREAMS_STREAM_WRITE_OBSERVER_H_ |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 | 9 |
| 10 class Stream; | 10 class Stream; |
| 11 | 11 |
| 12 class StreamWriteObserver { | 12 class StreamWriteObserver { |
| 13 public: | 13 public: |
| 14 // Sent when space becomes available in the stream, and the source should | 14 // Sent when space becomes available in the stream, and the source should |
| 15 // resume writing. | 15 // resume writing. |
| 16 virtual void OnSpaceAvailable(Stream* stream) = 0; | 16 virtual void OnSpaceAvailable(Stream* stream) = 0; |
| 17 | 17 |
| 18 // Sent when the stream is closed, and the writer should stop sending data. |
| 19 virtual void OnClose(Stream* stream) = 0; |
| 20 |
| 18 protected: | 21 protected: |
| 19 virtual ~StreamWriteObserver() {} | 22 virtual ~StreamWriteObserver() {} |
| 20 }; | 23 }; |
| 21 | 24 |
| 22 } // namespace content | 25 } // namespace content |
| 23 | 26 |
| 24 #endif // CONTENT_BROWSER_STREAMS_STREAM_WRITE_OBSERVER_H_ | 27 #endif // CONTENT_BROWSER_STREAMS_STREAM_WRITE_OBSERVER_H_ |
| OLD | NEW |