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

Unified Diff: public/platform/WebBlobInfo.h

Issue 205413004: Add two classes [as yet unused] needed for upcoming IDB Blob support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rolled in code review feedback. Created 6 years, 9 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
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
« Source/platform/blob/BlobInfo.h ('K') | « Source/platform/exported/WebBlobInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698