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 #if INSIDE_BLINK |
| 12 namespace WebCore { class BlobInfo; } |
| 13 #endif |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class WebBlobInfo { |
| 18 public: |
| 19 WebBlobInfo() |
| 20 : m_isFile(false) |
| 21 , m_size(-1) |
| 22 , m_lastModified(0) |
| 23 { |
| 24 } |
| 25 WebBlobInfo(const WebString& uuid, const WebString& type, long long size) |
| 26 : m_isFile(false) |
| 27 , m_uuid(uuid) |
| 28 , m_type(type) |
| 29 , m_size(size) |
| 30 , m_lastModified(0) |
| 31 { |
| 32 } |
| 33 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin
g& fileName, const WebString& type) |
| 34 : m_isFile(true) |
| 35 , m_uuid(uuid) |
| 36 , m_type(type) |
| 37 , m_size(-1) |
| 38 , m_filePath(filePath) |
| 39 , m_fileName(fileName) |
| 40 , m_lastModified(0) |
| 41 { |
| 42 } |
| 43 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin
g& fileName, const WebString& type, double lastModified, long long size) |
| 44 : m_isFile(true) |
| 45 , m_uuid(uuid) |
| 46 , m_type(type) |
| 47 , m_size(size) |
| 48 , m_filePath(filePath) |
| 49 , m_fileName(fileName) |
| 50 , m_lastModified(lastModified) |
| 51 { |
| 52 } |
| 53 bool isFile() const { return m_isFile; } |
| 54 const WebString& uuid() const { return m_uuid; } |
| 55 const WebString& type() const { return m_type; } |
| 56 long long size() const { return m_size; } |
| 57 const WebString& filePath() const { return m_filePath; } |
| 58 const WebString& fileName() const { return m_fileName; } |
| 59 double lastModified() const { return m_lastModified; } |
| 60 |
| 61 #if INSIDE_BLINK |
| 62 BLINK_COMMON_EXPORT operator WebCore::BlobInfo() const; |
| 63 #endif |
| 64 |
| 65 private: |
| 66 bool m_isFile; |
| 67 WebString m_uuid; |
| 68 WebString m_type; |
| 69 long long m_size; |
| 70 WebString m_filePath; |
| 71 WebString m_fileName; |
| 72 double m_lastModified; |
| 73 }; |
| 74 |
| 75 } // namespace blink |
| 76 |
| 77 #endif |
OLD | NEW |