diff options
Diffstat (limited to 'WebCore/html/Blob.h')
-rw-r--r-- | WebCore/html/Blob.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/WebCore/html/Blob.h b/WebCore/html/Blob.h index b910e8f..e8b5f3f 100644 --- a/WebCore/html/Blob.h +++ b/WebCore/html/Blob.h @@ -33,6 +33,7 @@ #include "ExceptionCode.h" #include "PlatformString.h" +#include <time.h> #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> @@ -40,6 +41,11 @@ namespace WebCore { class Blob : public RefCounted<Blob> { public: +#if ENABLE(BLOB_SLICE) + static const int toEndOfFile; + static const double doNotCheckFileChange; +#endif + static PassRefPtr<Blob> create(const String& path) { return adoptRef(new Blob(path)); @@ -47,14 +53,47 @@ public: virtual ~Blob() { } + virtual bool isFile() const { return false; } + +#if ENABLE(BLOB_SLICE) + PassRefPtr<Blob> slice(long long start, long long length) const; +#endif + const String& path() const { return m_path; } unsigned long long size() const; +#if ENABLE(BLOB_SLICE) + long long start() const { return m_start; } + long long length() const { return m_length; } + double modificationTime() const { return m_snapshotModificationTime; } +#endif protected: Blob(const String& path); private: +#if ENABLE(BLOB_SLICE) + Blob(const String& path, long long start, long long length, long long snapshotSize, double snapshotModificationTime); +#endif + + // The underlying path of the file-based blob. String m_path; + +#if ENABLE(BLOB_SLICE) + // The starting position of the file-based blob. + long long m_start; + + // The length of the file-based blob. The value of -1 means to the end of the file. + long long m_length; + + // A flag to tell if a snapshot has been captured. + bool m_snapshotCaptured; + + // The size of the file when a snapshot is captured. It can be 0 if the file is empty. + long long m_snapshotSize; + + // The last modification time of the file when a snapshot is captured. The value of 0 also means that the snapshot is not captured. + double m_snapshotModificationTime; +#endif }; } // namespace WebCore |