Index: Source/bindings/v8/BlobInfo.h |
diff --git a/Source/core/testing/LayerRect.h b/Source/bindings/v8/BlobInfo.h |
similarity index 52% |
copy from Source/core/testing/LayerRect.h |
copy to Source/bindings/v8/BlobInfo.h |
index 4827feee4f2476d200f0a986a73c81ca9cb4d020..c345e370877f8ea57bf2e35b1afac4fb329f54b8 100644 |
--- a/Source/core/testing/LayerRect.h |
+++ b/Source/bindings/v8/BlobInfo.h |
@@ -28,44 +28,67 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef LayerRect_h |
-#define LayerRect_h |
+#ifndef BlobInfo_h |
+#define BlobInfo_h |
-#include "core/dom/ClientRect.h" |
- |
-#include "wtf/PassRefPtr.h" |
-#include "wtf/RefCounted.h" |
-#include "wtf/RefPtr.h" |
+#include "core/platform/FileSystem.h" |
#include "wtf/text/WTFString.h" |
namespace WebCore { |
-class Node; |
- |
-class LayerRect : public RefCounted<LayerRect> { |
+class BlobInfo { |
public: |
- static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, const String& layerType, PassRefPtr<ClientRect> rect) |
+ BlobInfo() |
+ : m_isFile(false) |
+ , m_size(-1) |
{ |
- return adoptRef(new LayerRect(node, layerType, rect)); |
} |
- |
- Node* layerRootNode() const { return m_layerRootNode.get(); } |
- String layerType() const { return m_layerType; } |
- ClientRect* layerRelativeRect() const { return m_rect.get(); } |
- |
-private: |
- LayerRect(PassRefPtr<Node> node, const String& layerName, PassRefPtr<ClientRect> rect) |
- : m_layerRootNode(node) |
- , m_layerType(layerName) |
- , m_rect(rect) |
+ BlobInfo(const String& url, const String& type, long long size) |
+ : m_isFile(false) |
+ , m_url(url) |
+ , m_type(type) |
+ , m_size(size) |
+ , m_lastModified(0) |
+ { |
+ } |
+ BlobInfo(const String& url, const String& filePath, const String& fileName, const String& type, double lastModified, long long size) |
+ : m_isFile(true) |
+ , m_url(url) |
+ , m_type(type) |
+ , m_size(size) |
+ , m_filePath(filePath) |
+ , m_fileName(fileName) |
+ , m_lastModified(lastModified) |
+ { |
+ } |
+ BlobInfo(const String& filePath, const String& fileName, const String& type) |
+ : m_isFile(true) |
+ , m_type(type) |
+ , m_size(-1) |
+ , m_filePath(filePath) |
+ , m_fileName(fileName) |
+ , m_lastModified(0) |
{ |
} |
- RefPtr<Node> m_layerRootNode; |
- String m_layerType; |
- RefPtr<ClientRect> m_rect; |
+ bool isFile() const { return m_isFile; } |
+ const String& url() const { return m_url; } |
+ const String& type() const { return m_type; } |
+ long long size() const { return m_size; } |
+ const String& filePath() const { return m_filePath; } |
+ const String& fileName() const { return m_fileName; } |
+ double lastModified() const { return m_lastModified; } |
+ |
+private: |
+ bool m_isFile; |
+ String m_url; |
+ String m_type; // mime type |
+ long long m_size; |
+ String m_filePath; // only for File |
+ String m_fileName; // only for File |
+ double m_lastModified; // only for File |
}; |
} // namespace WebCore |
-#endif |
+#endif // BlobInfo_h |