Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef DataTransferItem_h | 31 #ifndef DataTransferItem_h |
| 32 #define DataTransferItem_h | 32 #define DataTransferItem_h |
| 33 | 33 |
| 34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
| 35 #include "heap/Handle.h" | |
| 35 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 36 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
| 37 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
| 38 | 39 |
| 39 namespace WebCore { | 40 namespace WebCore { |
| 40 | 41 |
| 41 class Blob; | 42 class Blob; |
| 42 class DataObjectItem; | 43 class DataObjectItem; |
| 43 class Clipboard; | 44 class Clipboard; |
| 44 class File; | 45 class File; |
| 45 class StringCallback; | 46 class StringCallback; |
| 46 class ExecutionContext; | 47 class ExecutionContext; |
| 47 | 48 |
| 48 class DataTransferItem : public RefCounted<DataTransferItem>, public ScriptWrapp able { | 49 class DataTransferItem : public RefCountedWillBeGarbageCollected<DataTransferIte m>, public ScriptWrappable { |
|
zerny-chromium
2014/02/17 10:43:13
+Finalized
| |
| 50 DECLARE_GC_INFO; | |
| 49 public: | 51 public: |
| 50 static PassRefPtr<DataTransferItem> create(PassRefPtr<Clipboard>, PassRefPtr <DataObjectItem>); | 52 static PassRefPtrWillBeRawPtr<DataTransferItem> create(PassRefPtrWillBeRawPt r<Clipboard>, PassRefPtrWillBeRawPtr<DataObjectItem>); |
| 51 ~DataTransferItem(); | 53 ~DataTransferItem(); |
| 52 | 54 |
| 53 String kind() const; | 55 String kind() const; |
| 54 String type() const; | 56 String type() const; |
| 55 | 57 |
| 56 void getAsString(ExecutionContext*, PassOwnPtr<StringCallback>) const; | 58 void getAsString(ExecutionContext*, PassOwnPtr<StringCallback>) const; |
| 57 PassRefPtr<Blob> getAsFile() const; | 59 PassRefPtr<Blob> getAsFile() const; |
| 58 | 60 |
| 59 Clipboard* clipboard() { return m_clipboard.get(); } | 61 Clipboard* clipboard() { return m_clipboard.get(); } |
| 60 DataObjectItem* dataObjectItem() { return m_item.get(); } | 62 DataObjectItem* dataObjectItem() { return m_item.get(); } |
| 61 | 63 |
| 64 void trace(Visitor*); | |
| 65 | |
| 62 private: | 66 private: |
| 63 DataTransferItem(PassRefPtr<Clipboard>, PassRefPtr<DataObjectItem>); | 67 DataTransferItem(PassRefPtrWillBeRawPtr<Clipboard>, PassRefPtrWillBeRawPtr<D ataObjectItem>); |
| 64 | 68 |
| 65 RefPtr<Clipboard> m_clipboard; | 69 RefPtrWillBeMember<Clipboard> m_clipboard; |
| 66 RefPtr<DataObjectItem> m_item; | 70 RefPtrWillBeMember<DataObjectItem> m_item; |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 } // namespace WebCore | 73 } // namespace WebCore |
| 70 | 74 |
| 71 #endif // DataTransferItem_h | 75 #endif // DataTransferItem_h |
| OLD | NEW |