OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef WebBlobInfo_h |
| 6 #define WebBlobInfo_h |
| 7 |
| 8 #include "WebCommon.h" |
| 9 #include "WebString.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class WebBlobInfo { |
| 14 public: |
| 15 WebBlobInfo() |
| 16 : m_isFile(false) |
| 17 , m_size(-1) |
| 18 , m_lastModified(0) |
| 19 { |
| 20 } |
| 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) |
| 27 { |
| 28 } |
| 29 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin
g& 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) |
| 37 { |
| 38 } |
| 39 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin
g& 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) |
| 47 { |
| 48 } |
| 49 bool isFile() const |
| 50 { |
| 51 return m_isFile; |
| 52 } |
| 53 const WebString& uuid() const |
| 54 { |
| 55 return m_uuid; |
| 56 } |
| 57 const WebString& type() const |
| 58 { |
| 59 return m_type; |
| 60 } |
| 61 long long size() const |
| 62 { |
| 63 return m_size; |
| 64 } |
| 65 const WebString& filePath() const |
| 66 { |
| 67 return m_filePath; |
| 68 } |
| 69 const WebString& fileName() const |
| 70 { |
| 71 return m_fileName; |
| 72 } |
| 73 double lastModified() const |
| 74 { |
| 75 return m_lastModified; |
| 76 } |
| 77 |
| 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 |
| 86 }; |
| 87 |
| 88 } // namespace blink |
| 89 |
| 90 #endif |
OLD | NEW |