Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / WebBlobInfo.h
blobd3a66ecef7b2fe7ad23ff64c41c4d00203c5a1c5
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WebBlobInfo_h
6 #define WebBlobInfo_h
8 #include "WebCommon.h"
9 #include "WebString.h"
11 namespace blink {
13 class WebBlobInfo {
14 public:
15 WebBlobInfo()
16 : m_isFile(false)
17 , m_size(-1)
18 , m_lastModified(0)
21 WebBlobInfo(const WebString& uuid, const WebString& type, long long size)
22 : m_isFile(false)
23 , m_uuid(uuid)
24 , m_type(type)
25 , m_size(size)
26 , m_lastModified(0)
29 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& type)
30 : m_isFile(true)
31 , m_uuid(uuid)
32 , m_type(type)
33 , m_size(-1)
34 , m_filePath(filePath)
35 , m_fileName(fileName)
36 , m_lastModified(0)
39 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& type, double lastModified, long long size)
40 : m_isFile(true)
41 , m_uuid(uuid)
42 , m_type(type)
43 , m_size(size)
44 , m_filePath(filePath)
45 , m_fileName(fileName)
46 , m_lastModified(lastModified)
49 bool isFile() const
51 return m_isFile;
53 const WebString& uuid() const
55 return m_uuid;
57 const WebString& type() const
59 return m_type;
61 long long size() const
63 return m_size;
65 const WebString& filePath() const
67 return m_filePath;
69 const WebString& fileName() const
71 return m_fileName;
73 double lastModified() const
75 return m_lastModified;
78 private:
79 bool m_isFile;
80 WebString m_uuid;
81 WebString m_type; // MIME type
82 long long m_size;
83 WebString m_filePath; // Only for File
84 WebString m_fileName; // Only for File
85 double m_lastModified; // Only for File
88 } // namespace blink
90 #endif