| 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 21 matching lines...) Expand all Loading... |
| 32 #define BlobRegistryProxy_h | 32 #define BlobRegistryProxy_h |
| 33 | 33 |
| 34 #if ENABLE(BLOB) | 34 #if ENABLE(BLOB) |
| 35 | 35 |
| 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 // Methods may be called on the main and worker threads. |
| 42 class BlobRegistryProxy : public BlobRegistry { | 43 class BlobRegistryProxy : public BlobRegistry { |
| 43 public: | 44 public: |
| 44 BlobRegistryProxy(); | 45 BlobRegistryProxy(); |
| 45 | 46 |
| 46 virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>); | 47 virtual void registerBlobData(const String& uuid, PassOwnPtr<BlobData>); |
| 47 virtual void registerBlobURL(const KURL&, const KURL& srcURL); | 48 virtual void addBlobDataRef(const String& uuid); |
| 48 virtual void unregisterBlobURL(const KURL&); | 49 virtual void removeBlobDataRef(const String& uuid); |
| 50 virtual void registerPublicBlobURL(SecurityOrigin*, const KURL&, PassRefPtr<
BlobDataHandle>); |
| 51 virtual void revokePublicBlobURL(const KURL&); |
| 49 | 52 |
| 50 virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceError
&, ResourceResponse&, Vector<char>& data) { return false; } | 53 // This method has thread affinity, the cached origin for a public blob url |
| 54 // will only be returned when invoked on the thread that registered the url. |
| 55 virtual PassRefPtr<SecurityOrigin> cachedUniqueOrigin(const KURL&); |
| 51 | 56 |
| 52 private: | 57 private: |
| 53 virtual ~BlobRegistryProxy() { } | 58 virtual ~BlobRegistryProxy() { } |
| 54 | 59 |
| 55 WebKit::WebBlobRegistry* m_webBlobRegistry; | 60 WebKit::WebBlobRegistry* m_webBlobRegistry; |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 } // namespace WebCore | 63 } // namespace WebCore |
| 59 | 64 |
| 60 #endif // ENABLE(BLOB) | 65 #endif // ENABLE(BLOB) |
| 61 | 66 |
| 62 #endif // BlobRegistryProxy_h | 67 #endif // BlobRegistryProxy_h |
| OLD | NEW |