diff options
Diffstat (limited to 'chromium/third_party/WebKit/public/platform/WebDragData.h')
-rw-r--r-- | chromium/third_party/WebKit/public/platform/WebDragData.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/chromium/third_party/WebKit/public/platform/WebDragData.h b/chromium/third_party/WebKit/public/platform/WebDragData.h index c40ce24060b..73e778c90ec 100644 --- a/chromium/third_party/WebKit/public/platform/WebDragData.h +++ b/chromium/third_party/WebKit/public/platform/WebDragData.h @@ -36,10 +36,7 @@ #include "WebString.h" #include "WebURL.h" -#if BLINK_IMPLEMENTATION -namespace WebCore { class ChromiumDataObject; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif +namespace WebCore { class DataObject; } namespace blink { @@ -60,6 +57,8 @@ public: // An image being dragged out of the renderer. Contains a buffer holding the image data // as well as the suggested name for saving the image to. StorageTypeBinaryData, + // Stores the filesystem URL of one file being dragged into the renderer. + StorageTypeFileSystemFile, }; StorageType storageType; @@ -79,26 +78,29 @@ public: // Filename when storageType == StorageTypeBinaryData. WebString title; + // Only valid when storageType == StorageTypeFileSystemFile. + WebURL fileSystemURL; + long long fileSystemFileSize; + // Only valid when stringType == "text/html". WebURL baseURL; }; - ~WebDragData() { reset(); } - - WebDragData() : m_private(0) { } - WebDragData(const WebDragData& d) : m_private(0) { assign(d); } - WebDragData& operator=(const WebDragData& d) + WebDragData() { } + WebDragData(const WebDragData& object) { assign(object); } + WebDragData& operator=(const WebDragData& object) { - assign(d); + assign(object); return *this; } + ~WebDragData() { reset(); } + + bool isNull() const { return m_private.isNull(); } BLINK_EXPORT void initialize(); BLINK_EXPORT void reset(); BLINK_EXPORT void assign(const WebDragData&); - bool isNull() const { return !m_private; } - BLINK_EXPORT WebVector<Item> items() const; BLINK_EXPORT void setItems(const WebVector<Item>&); BLINK_EXPORT void addItem(const Item&); @@ -107,15 +109,14 @@ public: BLINK_EXPORT void setFilesystemId(const WebString&); #if BLINK_IMPLEMENTATION - WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&); - WebDragData& operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&); - operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const; + explicit WebDragData(const PassRefPtrWillBeRawPtr<WebCore::DataObject>&); + WebDragData& operator=(const PassRefPtrWillBeRawPtr<WebCore::DataObject>&); + WebCore::DataObject* getValue() const; #endif private: - void assign(WebDragDataPrivate*); void ensureMutable(); - WebDragDataPrivate* m_private; + WebPrivatePtr<WebCore::DataObject> m_private; }; } // namespace blink |