Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | |
|
jsbell
2014/03/20 16:00:46
Use short copyright declaration
ericu
2014/03/25 00:00:26
Done.
| |
| 3 * | |
| 4 * Redistribution and use in source and binary forms, with or without | |
| 5 * modification, are permitted provided that the following conditions are | |
| 6 * met: | |
| 7 * | |
| 8 * * Redistributions of source code must retain the above copyright | |
| 9 * notice, this list of conditions and the following disclaimer. | |
| 10 * * Redistributions in binary form must reproduce the above | |
| 11 * copyright notice, this list of conditions and the following disclaimer | |
| 12 * in the documentation and/or other materials provided with the | |
| 13 * distribution. | |
| 14 * * Neither the name of Google Inc. nor the names of its | |
| 15 * contributors may be used to endorse or promote products derived from | |
| 16 * this software without specific prior written permission. | |
| 17 * | |
| 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 29 */ | |
| 30 | |
| 31 #ifndef WebBlobInfo_h | |
| 32 #define WebBlobInfo_h | |
| 33 | |
| 34 #include "WebCommon.h" | |
| 35 #include "WebString.h" | |
| 36 | |
| 37 #if INSIDE_BLINK | |
| 38 namespace WebCore { class BlobInfo; } | |
| 39 #endif | |
| 40 | |
| 41 namespace blink { | |
| 42 | |
| 43 class WebBlobInfo { | |
| 44 public: | |
| 45 WebBlobInfo() | |
| 46 : m_isFile(false) | |
| 47 , m_size(-1) | |
| 48 , m_lastModified(0) | |
| 49 { | |
| 50 } | |
| 51 WebBlobInfo(const WebString& uuid, const WebString& type, long long size) | |
| 52 : m_isFile(false) | |
| 53 , m_uuid(uuid) | |
| 54 , m_type(type) | |
| 55 , m_size(size) | |
| 56 , m_lastModified(0) | |
| 57 { | |
| 58 } | |
| 59 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin g& fileName, const WebString& type) | |
| 60 : m_isFile(true) | |
| 61 , m_uuid(uuid) | |
| 62 , m_type(type) | |
| 63 , m_size(-1) | |
| 64 , m_filePath(filePath) | |
| 65 , m_fileName(fileName) | |
| 66 , m_lastModified(0) | |
| 67 { | |
| 68 } | |
| 69 WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebStrin g& fileName, const WebString& type, double lastModified, long long size) | |
| 70 : m_isFile(true) | |
| 71 , m_uuid(uuid) | |
| 72 , m_type(type) | |
| 73 , m_size(size) | |
| 74 , m_filePath(filePath) | |
| 75 , m_fileName(fileName) | |
| 76 , m_lastModified(lastModified) | |
| 77 { | |
| 78 } | |
| 79 bool isFile() const { return m_isFile; } | |
| 80 const WebString& uuid() const { return m_uuid; } | |
| 81 const WebString& type() const { return m_type; } | |
| 82 long long size() const { return m_size; } | |
| 83 const WebString& filePath() const { return m_filePath; } | |
| 84 const WebString& fileName() const { return m_fileName; } | |
| 85 double lastModified() const { return m_lastModified; } | |
| 86 | |
| 87 #if INSIDE_BLINK | |
| 88 BLINK_COMMON_EXPORT operator WebCore::BlobInfo() const; | |
| 89 #endif | |
| 90 | |
| 91 private: | |
| 92 bool m_isFile; | |
| 93 WebString m_uuid; | |
| 94 WebString m_type; | |
| 95 long long m_size; | |
| 96 WebString m_filePath; | |
| 97 WebString m_fileName; | |
| 98 double m_lastModified; | |
| 99 }; | |
| 100 | |
| 101 } // namespace blink | |
| 102 | |
| 103 #endif | |
| OLD | NEW |