Chromium Code Reviews| Index: Source/core/clipboard/DataObject.h |
| diff --git a/Source/core/clipboard/DataObject.h b/Source/core/clipboard/DataObject.h |
| index edcd0062b748073d7580d5951ab6b930532e5ea5..c68cb62bbddbabdb96c54ccbee2366a0fef81269 100644 |
| --- a/Source/core/clipboard/DataObject.h |
| +++ b/Source/core/clipboard/DataObject.h |
| @@ -37,8 +37,7 @@ |
| #include "platform/Supplementable.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/ListHashSet.h" |
| -#include "wtf/RefCounted.h" |
| -#include "wtf/RefPtr.h" |
| +#include "wtf/PassRefPtr.h" |
| #include "wtf/Vector.h" |
| #include "wtf/text/StringHash.h" |
| #include "wtf/text/WTFString.h" |
| @@ -52,24 +51,26 @@ class WebDragData; |
| // A data object for holding data that would be in a clipboard or moved |
| // during a drag-n-drop operation. This is the data that WebCore is aware |
| // of and is not specific to a platform. |
| -class CORE_EXPORT DataObject : public RefCountedWillBeGarbageCollectedFinalized<DataObject>, public WillBeHeapSupplementable<DataObject> { |
| - WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DataObject); |
| +class DataObject : public GarbageCollectedFinalized<DataObject>, public HeapSupplementable<DataObject> { |
|
sof
2015/04/22 21:48:11
Will add back CORE_EXPORT.
sof
2015/04/23 08:01:53
Done.
|
| + USING_GARBAGE_COLLECTED_MIXIN(DataObject); |
| public: |
| - static PassRefPtrWillBeRawPtr<DataObject> createFromPasteboard(PasteMode); |
| - static PassRefPtrWillBeRawPtr<DataObject> create(); |
| - static PassRefPtrWillBeRawPtr<DataObject> create(WebDragData); |
| + static DataObject* createFromPasteboard(PasteMode); |
| + static DataObject* create(); |
| + static DataObject* create(WebDragData); |
| + |
| + DataObject* copy() const; |
|
haraken
2015/04/23 04:47:08
What is this for?
sof
2015/04/23 08:01:53
Oops, an unmoored declaration that was removed in
|
| virtual ~DataObject(); |
| // DataTransferItemList support. |
| size_t length() const; |
| - PassRefPtrWillBeRawPtr<DataObjectItem> item(unsigned long index); |
| + DataObjectItem* item(unsigned long index); |
| // FIXME: Implement V8DataTransferItemList::indexedPropertyDeleter to get this called. |
| void deleteItem(unsigned long index); |
| void clearAll(); |
| // Returns null if an item already exists with the provided type. |
| - PassRefPtrWillBeRawPtr<DataObjectItem> add(const String& data, const String& type); |
| - PassRefPtrWillBeRawPtr<DataObjectItem> add(File*); |
| + DataObjectItem* add(const String& data, const String& type); |
| + DataObjectItem* add(File*); |
| // WebCore helpers. |
| void clearData(const String& type); |
| @@ -105,11 +106,11 @@ public: |
| private: |
| DataObject(); |
| - PassRefPtrWillBeRawPtr<DataObjectItem> findStringItem(const String& type) const; |
| - bool internalAddStringItem(PassRefPtrWillBeRawPtr<DataObjectItem>); |
| - void internalAddFileItem(PassRefPtrWillBeRawPtr<DataObjectItem>); |
| + DataObjectItem* findStringItem(const String& type) const; |
| + bool internalAddStringItem(DataObjectItem*); |
| + void internalAddFileItem(DataObjectItem*); |
| - WillBeHeapVector<RefPtrWillBeMember<DataObjectItem>> m_itemList; |
| + HeapVector<Member<DataObjectItem>> m_itemList; |
| // State of Shift/Ctrl/Alt/Meta keys and Left/Right/Middle mouse buttons |
| int m_modifiers; |