| 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 25 matching lines...) Expand all Loading... |
| 36 #include "BlobRegistry.h" | 36 #include "BlobRegistry.h" |
| 37 | 37 |
| 38 namespace WebKit { class WebBlobRegistry; } | 38 namespace WebKit { class WebBlobRegistry; } |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class BlobRegistryProxy : public BlobRegistry { | 42 class BlobRegistryProxy : public BlobRegistry { |
| 43 public: | 43 public: |
| 44 BlobRegistryProxy(); | 44 BlobRegistryProxy(); |
| 45 | 45 |
| 46 virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>); | 46 // BlobData registration: may be called on any thread. |
| 47 virtual void registerBlobURL(const KURL&, const KURL& srcURL); | 47 virtual void registerBlobData(const String& uuid, PassOwnPtr<BlobData>); |
| 48 virtual void unregisterBlobURL(const KURL&); | 48 virtual void addBlobDataRef(const String& uuid); |
| 49 virtual void removeBlobDataRef(const String& uuid); |
| 49 | 50 |
| 50 virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceError
&, ResourceResponse&, Vector<char>& data) { return false; } | 51 // Public Blob URL registration: may be called on any thread. |
| 52 virtual void registerPublicBlobURL(SecurityOrigin*, const KURL&, PassRefPtr<
BlobDataHandle>); |
| 53 virtual void revokePublicBlobURL(const KURL&); |
| 54 virtual PassRefPtr<SecurityOrigin> cachedUniqueOrigin(const KURL&); |
| 55 |
| 56 // DEPRECATED: the old api. |
| 57 //virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>); |
| 58 //virtual void registerBlobURL(const KURL&, const KURL& srcURL); |
| 59 //virtual void unregisterBlobURL(const KURL&); |
| 60 //virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceErr
or&, ResourceResponse&, Vector<char>& data) { return false; } |
| 51 | 61 |
| 52 private: | 62 private: |
| 53 virtual ~BlobRegistryProxy() { } | 63 virtual ~BlobRegistryProxy() { } |
| 54 | 64 |
| 55 WebKit::WebBlobRegistry* m_webBlobRegistry; | 65 WebKit::WebBlobRegistry* m_webBlobRegistry; |
| 56 }; | 66 }; |
| 57 | 67 |
| 58 } // namespace WebCore | 68 } // namespace WebCore |
| 59 | 69 |
| 60 #endif // ENABLE(BLOB) | 70 #endif // ENABLE(BLOB) |
| 61 | 71 |
| 62 #endif // BlobRegistryProxy_h | 72 #endif // BlobRegistryProxy_h |
| OLD | NEW |