OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 virtual ~Stream(); | 56 virtual ~Stream(); |
57 | 57 |
58 // Returns the internal URL referring to this stream. | 58 // Returns the internal URL referring to this stream. |
59 const KURL& url() const { return m_internalURL; } | 59 const KURL& url() const { return m_internalURL; } |
60 // Returns the media type of this stream. | 60 // Returns the media type of this stream. |
61 const String& type() const { return m_mediaType; } | 61 const String& type() const { return m_mediaType; } |
62 | 62 |
63 // Appends data to this stream. | 63 // Appends data to this stream. |
64 void addData(const char* data, size_t len); | 64 void addData(const char* data, size_t len); |
| 65 // Flushes contents buffered in the stream. |
| 66 void flush(); |
65 // Mark this stream finalized so that a reader of this stream is notified | 67 // Mark this stream finalized so that a reader of this stream is notified |
66 // of EOF. | 68 // of EOF. |
67 void finalize(); | 69 void finalize(); |
68 // Mark this stream finalized due to an error so that a reader of this | 70 // Mark this stream finalized due to an error so that a reader of this |
69 // stream is notified of EOF due to the error. | 71 // stream is notified of EOF due to the error. |
70 void abort(); | 72 void abort(); |
71 | 73 |
72 // Allow an external reader class to mark this object neutered so that they | 74 // Allow an external reader class to mark this object neutered so that they |
73 // won't load the corresponding stream again. All stream objects are | 75 // won't load the corresponding stream again. All stream objects are |
74 // read-once for now. | 76 // read-once for now. |
(...skipping 18 matching lines...) Expand all Loading... |
93 KURL m_internalURL; | 95 KURL m_internalURL; |
94 | 96 |
95 String m_mediaType; | 97 String m_mediaType; |
96 | 98 |
97 bool m_isNeutered; | 99 bool m_isNeutered; |
98 }; | 100 }; |
99 | 101 |
100 } // namespace blink | 102 } // namespace blink |
101 | 103 |
102 #endif // Stream_h | 104 #endif // Stream_h |
OLD | NEW |