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

Unified Diff: WebCore/fileapi/Blob.h

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/bindings/v8/SerializedScriptValue.cpp ('k') | WebCore/fileapi/Blob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/fileapi/Blob.h
===================================================================
--- WebCore/fileapi/Blob.h (revision 140218)
+++ WebCore/fileapi/Blob.h (working copy)
@@ -32,7 +32,6 @@
#define Blob_h
#include "BlobData.h"
-#include "KURL.h"
#include "ScriptWrappable.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
@@ -48,46 +47,33 @@
public:
static PassRefPtr<Blob> create()
{
- return adoptRef(new Blob);
+ return adoptRef(new Blob(BlobDataHandle::create()));
}
- static PassRefPtr<Blob> create(PassOwnPtr<BlobData> blobData, long long size)
+ static PassRefPtr<Blob> create(PassRefPtr<BlobDataHandle> blobDataHandle)
{
- return adoptRef(new Blob(blobData, size));
+ return adoptRef(new Blob(blobDataHandle));
}
- // For deserialization.
- static PassRefPtr<Blob> create(const KURL& srcURL, const String& type, long long size)
- {
- return adoptRef(new Blob(srcURL, type, size));
- }
-
virtual ~Blob();
- const KURL& url() const { return m_internalURL; }
- const String& type() const { return m_type; }
-
- virtual unsigned long long size() const { return static_cast<unsigned long long>(m_size); }
+ String uuid() const { return m_blobDataHandle->uuid(); }
+ String type() const { return m_blobDataHandle->type(); }
+ virtual unsigned long long size() const { return m_blobDataHandle->size(); }
virtual bool isFile() const { return false; }
+ PassRefPtr<BlobDataHandle> blobDataHandle() const { return m_blobDataHandle; }
+
#if ENABLE(BLOB)
PassRefPtr<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
#endif
protected:
- Blob();
- Blob(PassOwnPtr<BlobData>, long long size);
+ Blob(PassRefPtr<BlobDataHandle>);
- // For deserialization.
- Blob(const KURL& srcURL, const String& type, long long size);
-
- // This is an internal URL referring to the blob data associated with this object. It serves
- // as an identifier for this blob. The internal URL is never used to source the blob's content
- // into an HTML or for FileRead'ing, public blob URLs must be used for those purposes.
- KURL m_internalURL;
-
- String m_type;
- long long m_size;
+private:
+ Blob();
+ RefPtr<BlobDataHandle> m_blobDataHandle;
};
} // namespace WebCore
« no previous file with comments | « WebCore/bindings/v8/SerializedScriptValue.cpp ('k') | WebCore/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698