| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual void build() = 0; | 70 virtual void build() = 0; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 virtual ~WebBlobRegistry() { } | 73 virtual ~WebBlobRegistry() { } |
| 74 | 74 |
| 75 // TODO(dmurph): Deprecate and migrate to createBuilder | 75 // TODO(dmurph): Deprecate and migrate to createBuilder |
| 76 virtual void registerBlobData(const WebString& uuid, const WebBlobData&) { } | 76 virtual void registerBlobData(const WebString& uuid, const WebBlobData&) { } |
| 77 | 77 |
| 78 // Caller takes ownership of the Builder. The blob is finalized (and sent to | 78 // Caller takes ownership of the Builder. The blob is finalized (and sent to |
| 79 // the browser) on calling build() on the Builder object. | 79 // the browser) on calling build() on the Builder object. |
| 80 virtual Builder* createBuilder(const WebString& uuid, const WebString& conte
ntType) { BLINK_ASSERT_NOT_REACHED(); return nullptr; } | 80 virtual Builder* createBuilder(const WebString& uuid, const WebString& conte
ntType) = 0; |
| 81 | 81 |
| 82 virtual void addBlobDataRef(const WebString& uuid) { } | 82 virtual void addBlobDataRef(const WebString& uuid) { } |
| 83 virtual void removeBlobDataRef(const WebString& uuid) { } | 83 virtual void removeBlobDataRef(const WebString& uuid) { } |
| 84 virtual void registerPublicBlobURL(const WebURL&, const WebString& uuid) { } | 84 virtual void registerPublicBlobURL(const WebURL&, const WebString& uuid) { } |
| 85 virtual void revokePublicBlobURL(const WebURL&) { } | 85 virtual void revokePublicBlobURL(const WebURL&) { } |
| 86 | 86 |
| 87 // Registers a stream URL referring to a stream with the specified media | 87 // Registers a stream URL referring to a stream with the specified media |
| 88 // type. | 88 // type. |
| 89 virtual void registerStreamURL(const WebURL&, const WebString&) { BLINK_ASSE
RT_NOT_REACHED(); } | 89 virtual void registerStreamURL(const WebURL&, const WebString&) = 0; |
| 90 | 90 |
| 91 // Registers a stream URL referring to the stream identified by the | 91 // Registers a stream URL referring to the stream identified by the |
| 92 // specified srcURL. | 92 // specified srcURL. |
| 93 virtual void registerStreamURL(const WebURL&, const WebURL& srcURL) { BLINK_
ASSERT_NOT_REACHED(); } | 93 virtual void registerStreamURL(const WebURL&, const WebURL& srcURL) = 0; |
| 94 | 94 |
| 95 // Add data to the stream referred by the URL. | 95 // Add data to the stream referred by the URL. |
| 96 virtual void addDataToStream(const WebURL&, const char* data, size_t length)
{ BLINK_ASSERT_NOT_REACHED(); } | 96 virtual void addDataToStream(const WebURL&, const char* data, size_t length)
= 0; |
| 97 | 97 |
| 98 // Flush contents buffered in the stream to the corresponding reader. | 98 // Flush contents buffered in the stream to the corresponding reader. |
| 99 virtual void flushStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } | 99 virtual void flushStream(const WebURL&) = 0; |
| 100 | 100 |
| 101 // Tell the registry that construction of this stream has completed | 101 // Tell the registry that construction of this stream has completed |
| 102 // successfully and so it won't receive any more data. | 102 // successfully and so it won't receive any more data. |
| 103 virtual void finalizeStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } | 103 virtual void finalizeStream(const WebURL&) = 0; |
| 104 | 104 |
| 105 // Tell the registry that construction of this stream has been aborted and | 105 // Tell the registry that construction of this stream has been aborted and |
| 106 // so it won't receive any more data. | 106 // so it won't receive any more data. |
| 107 virtual void abortStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } | 107 virtual void abortStream(const WebURL&) = 0; |
| 108 | 108 |
| 109 // Unregisters a stream referred by the URL. | 109 // Unregisters a stream referred by the URL. |
| 110 virtual void unregisterStreamURL(const WebURL&) { BLINK_ASSERT_NOT_REACHED()
; } | 110 virtual void unregisterStreamURL(const WebURL&) = 0; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| 114 | 114 |
| 115 #endif // WebBlobRegistry_h | 115 #endif // WebBlobRegistry_h |
| OLD | NEW |