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 20 matching lines...) Expand all Loading... |
31 #ifndef BlobRegistry_h | 31 #ifndef BlobRegistry_h |
32 #define BlobRegistry_h | 32 #define BlobRegistry_h |
33 | 33 |
34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
35 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
36 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class BlobData; | 40 class BlobData; |
| 41 class BlobDataHandle; |
41 class KURL; | 42 class KURL; |
42 class RawData; | 43 class RawData; |
43 class SecurityOrigin; | 44 class SecurityOrigin; |
44 | 45 |
45 // A bridging class for calling WebKit::WebBlobRegistry methods on the main | 46 // A bridging class for calling WebKit::WebBlobRegistry methods. |
46 // thread. Each method gets the WebBlobRegistry implementation instance and | |
47 // calls the corresponding method (the same name) on it using callOnMainThread() | |
48 // if necessary. | |
49 class BlobRegistry { | 47 class BlobRegistry { |
50 public: | 48 public: |
51 // Methods for controlling Blobs. | 49 // Methods for controlling Blobs. |
52 static void registerBlobURL(const KURL&, PassOwnPtr<BlobData>); | 50 static void registerBlobData(const String& uuid, PassOwnPtr<BlobData>); |
53 static void registerBlobURL(SecurityOrigin*, const KURL&, const KURL& srcURL
); | 51 static void addBlobDataRef(const String& uuid); |
54 static void unregisterBlobURL(const KURL&); | 52 static void removeBlobDataRef(const String& uuid); |
| 53 static void registerPublicBlobURL(SecurityOrigin*, const KURL&, PassRefPtr<B
lobDataHandle>); |
| 54 static void revokePublicBlobURL(const KURL&); |
55 | 55 |
56 // Methods for controlling Streams. | 56 // Methods for controlling Streams. |
57 static void registerStreamURL(const KURL&, const String&); | 57 static void registerStreamURL(const KURL&, const String&); |
58 static void registerStreamURL(SecurityOrigin*, const KURL&, const KURL& srcU
RL); | 58 static void registerStreamURL(SecurityOrigin*, const KURL&, const KURL& srcU
RL); |
59 static void addDataToStream(const KURL&, PassRefPtr<RawData>); | 59 static void addDataToStream(const KURL&, PassRefPtr<RawData>); |
60 static void finalizeStream(const KURL&); | 60 static void finalizeStream(const KURL&); |
61 static void abortStream(const KURL&); | 61 static void abortStream(const KURL&); |
62 static void unregisterStreamURL(const KURL&); | 62 static void unregisterStreamURL(const KURL&); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace WebCore | 65 } // namespace WebCore |
66 | 66 |
67 #endif // BlobRegistry_h | 67 #endif // BlobRegistry_h |
OLD | NEW |