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 29 matching lines...) Expand all Loading... |
40 namespace WTF { template <typename T> class PassOwnPtr; } | 40 namespace WTF { template <typename T> class PassOwnPtr; } |
41 #endif | 41 #endif |
42 | 42 |
43 namespace WebKit { | 43 namespace WebKit { |
44 | 44 |
45 class WebBlobDataPrivate; | 45 class WebBlobDataPrivate; |
46 | 46 |
47 class WebBlobData { | 47 class WebBlobData { |
48 public: | 48 public: |
49 struct Item { | 49 struct Item { |
50 enum { TypeData, TypeFile, TypeBlob, TypeURL } type; | 50 // TypeURL is DEPRECATED |
| 51 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL, TypeURL = TypeFi
leSystemURL } type; |
51 WebThreadSafeData data; | 52 WebThreadSafeData data; |
52 WebString filePath; | 53 WebString filePath; |
53 WebURL url; // For TypeBlob or TypeURL. | 54 WebURL fileSystemURL; |
54 long long offset; | 55 long long offset; |
55 long long length; // -1 means go to the end of the file/blob. | 56 long long length; // -1 means go to the end of the file/blob. |
56 double expectedModificationTime; // 0.0 means that the time is not set. | 57 double expectedModificationTime; // 0.0 means that the time is not set. |
57 | 58 |
58 // FIXME: deprecate this. | 59 // DEPRECATED, use fileSystemURL |
| 60 WebURL url; |
| 61 |
| 62 // FIXME: deprecate url and use uuid |
59 WebURL blobURL; | 63 WebURL blobURL; |
| 64 WebString blobUUID; |
60 }; | 65 }; |
61 | 66 |
62 ~WebBlobData() { reset(); } | 67 ~WebBlobData() { reset(); } |
63 | 68 |
64 WebBlobData() : m_private(0) { } | 69 WebBlobData() : m_private(0) { } |
65 | 70 |
66 WEBKIT_EXPORT void initialize(); | 71 WEBKIT_EXPORT void initialize(); |
67 WEBKIT_EXPORT void reset(); | 72 WEBKIT_EXPORT void reset(); |
68 | 73 |
69 bool isNull() const { return !m_private; } | 74 bool isNull() const { return !m_private; } |
(...skipping 18 matching lines...) Expand all Loading... |
88 private: | 93 private: |
89 #if WEBKIT_IMPLEMENTATION | 94 #if WEBKIT_IMPLEMENTATION |
90 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); | 95 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); |
91 #endif | 96 #endif |
92 WebBlobDataPrivate* m_private; | 97 WebBlobDataPrivate* m_private; |
93 }; | 98 }; |
94 | 99 |
95 } // namespace WebKit | 100 } // namespace WebKit |
96 | 101 |
97 #endif // WebBlobData_h | 102 #endif // WebBlobData_h |
OLD | NEW |