| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebBlobRegistry_h | 31 #ifndef WebBlobRegistry_h |
| 32 #define WebBlobRegistry_h | 32 #define WebBlobRegistry_h |
| 33 | 33 |
| 34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class WebBlobData; | 38 class WebBlobData; |
| 39 class WebString; | 39 class WebString; |
| 40 class WebThreadSafeData; | |
| 41 class WebURL; | 40 class WebURL; |
| 42 | 41 |
| 43 class WebBlobRegistry { | 42 class WebBlobRegistry { |
| 44 public: | 43 public: |
| 45 virtual ~WebBlobRegistry() { } | 44 virtual ~WebBlobRegistry() { } |
| 46 | 45 |
| 47 virtual void registerBlobData(const WebString& uuid, const WebBlobData&) { } | 46 virtual void registerBlobData(const WebString& uuid, const WebBlobData&) { } |
| 48 virtual void addBlobDataRef(const WebString& uuid) { } | 47 virtual void addBlobDataRef(const WebString& uuid) { } |
| 49 virtual void removeBlobDataRef(const WebString& uuid) { } | 48 virtual void removeBlobDataRef(const WebString& uuid) { } |
| 50 virtual void registerPublicBlobURL(const WebURL&, const WebString& uuid) { } | 49 virtual void registerPublicBlobURL(const WebURL&, const WebString& uuid) { } |
| 51 virtual void revokePublicBlobURL(const WebURL&) { } | 50 virtual void revokePublicBlobURL(const WebURL&) { } |
| 52 | 51 |
| 53 // Registers a stream URL referring to a stream with the specified media | 52 // Registers a stream URL referring to a stream with the specified media |
| 54 // type. | 53 // type. |
| 55 virtual void registerStreamURL(const WebURL&, const WebString&) { BLINK_ASSE
RT_NOT_REACHED(); } | 54 virtual void registerStreamURL(const WebURL&, const WebString&) { BLINK_ASSE
RT_NOT_REACHED(); } |
| 56 | 55 |
| 57 // Registers a stream URL referring to the stream identified by the | 56 // Registers a stream URL referring to the stream identified by the |
| 58 // specified srcURL. | 57 // specified srcURL. |
| 59 virtual void registerStreamURL(const WebURL&, const WebURL& srcURL) { BLINK_
ASSERT_NOT_REACHED(); }; | 58 virtual void registerStreamURL(const WebURL&, const WebURL& srcURL) { BLINK_
ASSERT_NOT_REACHED(); }; |
| 60 | 59 |
| 61 // Add data to the stream referred by the URL. | 60 // Add data to the stream referred by the URL. |
| 62 virtual void addDataToStream(const WebURL&, WebThreadSafeData&) { BLINK_ASSE
RT_NOT_REACHED(); } | 61 virtual void addDataToStream(const WebURL&, const char* data, size_t length)
{ BLINK_ASSERT_NOT_REACHED(); } |
| 63 | 62 |
| 64 // Tell the registry that construction of this stream has completed | 63 // Tell the registry that construction of this stream has completed |
| 65 // successfully and so it won't receive any more data. | 64 // successfully and so it won't receive any more data. |
| 66 virtual void finalizeStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } | 65 virtual void finalizeStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } |
| 67 | 66 |
| 68 // Tell the registry that construction of this stream has been aborted and | 67 // Tell the registry that construction of this stream has been aborted and |
| 69 // so it won't receive any more data. | 68 // so it won't receive any more data. |
| 70 virtual void abortStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } | 69 virtual void abortStream(const WebURL&) { BLINK_ASSERT_NOT_REACHED(); } |
| 71 | 70 |
| 72 // Unregisters a stream referred by the URL. | 71 // Unregisters a stream referred by the URL. |
| 73 virtual void unregisterStreamURL(const WebURL&) { BLINK_ASSERT_NOT_REACHED()
; } | 72 virtual void unregisterStreamURL(const WebURL&) { BLINK_ASSERT_NOT_REACHED()
; } |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace blink | 75 } // namespace blink |
| 77 | 76 |
| 78 #endif // WebBlobRegistry_h | 77 #endif // WebBlobRegistry_h |
| OLD | NEW |