Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: public/platform/WebBlobData.h

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebBlobData.cpp ('k') | public/platform/WebHTTPBody.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL } type;
51 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL, TypeURL = TypeFi leSystemURL } type;
52 WebThreadSafeData data; 53 WebThreadSafeData data;
54 WebString blobUUID;
53 WebString filePath; 55 WebString filePath;
54 WebURL fileSystemURL; 56 WebURL fileSystemURL;
55 long long offset; 57 long long offset;
56 long long length; // -1 means go to the end of the file/blob. 58 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. 59 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 }; 60 };
66 61
67 ~WebBlobData() { reset(); } 62 ~WebBlobData() { reset(); }
68 63
69 WebBlobData() : m_private(0) { } 64 WebBlobData() : m_private(0) { }
70 65
71 BLINK_EXPORT void initialize(); 66 BLINK_EXPORT void initialize();
72 BLINK_EXPORT void reset(); 67 BLINK_EXPORT void reset();
73 68
74 bool isNull() const { return !m_private; } 69 bool isNull() const { return !m_private; }
(...skipping 18 matching lines...) Expand all
93 private: 88 private:
94 #if BLINK_IMPLEMENTATION 89 #if BLINK_IMPLEMENTATION
95 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); 90 void assign(const WTF::PassOwnPtr<WebCore::BlobData>&);
96 #endif 91 #endif
97 WebBlobDataPrivate* m_private; 92 WebBlobDataPrivate* m_private;
98 }; 93 };
99 94
100 } // namespace WebKit 95 } // namespace WebKit
101 96
102 #endif // WebBlobData_h 97 #endif // WebBlobData_h
OLDNEW
« no previous file with comments | « Source/web/WebBlobData.cpp ('k') | public/platform/WebHTTPBody.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698