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 17 matching lines...) Expand all Loading... | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebBlobData_h | 31 #ifndef WebBlobData_h |
32 #define WebBlobData_h | 32 #define WebBlobData_h |
33 | 33 |
34 #include "WebString.h" | 34 #include "WebString.h" |
35 #include "WebThreadSafeData.h" | 35 #include "WebThreadSafeData.h" |
36 #include "WebURL.h" | 36 #include "WebURL.h" |
37 | 37 |
38 #define USE_BLOB_UUIDS | |
jsbell
2013/09/26 19:12:46
Is this used anywhere?
kinuko
2013/09/30 11:31:53
(on behalf of michaeln) it's for chromium-side imp
| |
39 | |
38 #if BLINK_IMPLEMENTATION | 40 #if BLINK_IMPLEMENTATION |
39 namespace WebCore { class BlobData; } | 41 namespace WebCore { class BlobData; } |
40 namespace WTF { template <typename T> class PassOwnPtr; } | 42 namespace WTF { template <typename T> class PassOwnPtr; } |
41 #endif | 43 #endif |
42 | 44 |
43 namespace WebKit { | 45 namespace WebKit { |
44 | 46 |
45 class WebBlobDataPrivate; | 47 class WebBlobDataPrivate; |
46 | 48 |
47 class WebBlobData { | 49 class WebBlobData { |
48 public: | 50 public: |
49 struct Item { | 51 struct Item { |
50 // TypeURL is DEPRECATED | 52 // TypeURL is DEPRECATED |
kinuko
2013/09/30 11:31:53
Can you remove this comment too?
michaeln
2013/09/30 20:50:24
done
| |
51 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL, TypeURL = TypeFi leSystemURL } type; | 53 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL } type; |
52 WebThreadSafeData data; | 54 WebThreadSafeData data; |
55 WebString blobUUID; | |
53 WebString filePath; | 56 WebString filePath; |
54 WebURL fileSystemURL; | 57 WebURL fileSystemURL; |
55 long long offset; | 58 long long offset; |
56 long long length; // -1 means go to the end of the file/blob. | 59 long long length; // -1 means go to the end of the file/blob. |
57 double expectedModificationTime; // 0.0 means that the time is not set. | 60 double expectedModificationTime; // 0.0 means that the time is not set. |
58 | |
59 // DEPRECATED, use fileSystemURL | |
60 WebURL url; | |
61 | |
62 // FIXME: deprecate url and use uuid | |
63 WebURL blobURL; | |
64 WebString blobUUID; | |
65 }; | 61 }; |
66 | 62 |
67 ~WebBlobData() { reset(); } | 63 ~WebBlobData() { reset(); } |
68 | 64 |
69 WebBlobData() : m_private(0) { } | 65 WebBlobData() : m_private(0) { } |
70 | 66 |
71 BLINK_EXPORT void initialize(); | 67 BLINK_EXPORT void initialize(); |
72 BLINK_EXPORT void reset(); | 68 BLINK_EXPORT void reset(); |
73 | 69 |
74 bool isNull() const { return !m_private; } | 70 bool isNull() const { return !m_private; } |
(...skipping 18 matching lines...) Expand all Loading... | |
93 private: | 89 private: |
94 #if BLINK_IMPLEMENTATION | 90 #if BLINK_IMPLEMENTATION |
95 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); | 91 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); |
96 #endif | 92 #endif |
97 WebBlobDataPrivate* m_private; | 93 WebBlobDataPrivate* m_private; |
98 }; | 94 }; |
99 | 95 |
100 } // namespace WebKit | 96 } // namespace WebKit |
101 | 97 |
102 #endif // WebBlobData_h | 98 #endif // WebBlobData_h |
OLD | NEW |