Index: public/platform/WebBlobInfo.h |
diff --git a/public/platform/WebBlobInfo.h b/public/platform/WebBlobInfo.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2723ff9f806691f43d8e238fa72ba617b3ac1719 |
--- /dev/null |
+++ b/public/platform/WebBlobInfo.h |
@@ -0,0 +1,77 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebBlobInfo_h |
+#define WebBlobInfo_h |
+ |
+#include "WebCommon.h" |
+#include "WebString.h" |
+ |
+#if INSIDE_BLINK |
+namespace WebCore { class BlobInfo; } |
+#endif |
+ |
+namespace blink { |
+ |
+class WebBlobInfo { |
+public: |
+ WebBlobInfo() |
+ : m_isFile(false) |
+ , m_size(-1) |
+ , m_lastModified(0) |
+ { |
+ } |
+ WebBlobInfo(const WebString& uuid, const WebString& type, long long size) |
+ : m_isFile(false) |
+ , m_uuid(uuid) |
+ , m_type(type) |
+ , m_size(size) |
+ , m_lastModified(0) |
+ { |
+ } |
+ WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& type) |
+ : m_isFile(true) |
+ , m_uuid(uuid) |
+ , m_type(type) |
+ , m_size(-1) |
+ , m_filePath(filePath) |
+ , m_fileName(fileName) |
+ , m_lastModified(0) |
+ { |
+ } |
+ WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& type, double lastModified, long long size) |
+ : m_isFile(true) |
+ , m_uuid(uuid) |
+ , m_type(type) |
+ , m_size(size) |
+ , m_filePath(filePath) |
+ , m_fileName(fileName) |
+ , m_lastModified(lastModified) |
+ { |
+ } |
+ bool isFile() const { return m_isFile; } |
+ const WebString& uuid() const { return m_uuid; } |
+ const WebString& type() const { return m_type; } |
+ long long size() const { return m_size; } |
+ const WebString& filePath() const { return m_filePath; } |
+ const WebString& fileName() const { return m_fileName; } |
+ double lastModified() const { return m_lastModified; } |
+ |
+#if INSIDE_BLINK |
+ BLINK_COMMON_EXPORT operator WebCore::BlobInfo() const; |
+#endif |
+ |
+private: |
+ bool m_isFile; |
+ WebString m_uuid; |
+ WebString m_type; |
+ long long m_size; |
+ WebString m_filePath; |
+ WebString m_fileName; |
+ double m_lastModified; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |