| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google Inc. | 3 * Copyright (C) 2008, 2009 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/clipboard/DataTransferItemList.h" | 28 #include "core/clipboard/DataTransferItemList.h" |
| 29 | 29 |
| 30 #include "bindings/core/v8/ExceptionState.h" | 30 #include "bindings/core/v8/ExceptionState.h" |
| 31 #include "core/clipboard/DataObject.h" | 31 #include "core/clipboard/DataObject.h" |
| 32 #include "core/clipboard/DataTransfer.h" | 32 #include "core/clipboard/DataTransfer.h" |
| 33 #include "core/clipboard/DataTransferItem.h" | 33 #include "core/clipboard/DataTransferItem.h" |
| 34 #include "core/dom/ExceptionCode.h" | 34 #include "core/dom/ExceptionCode.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DataTransferItemList); |
| 39 |
| 38 PassRefPtrWillBeRawPtr<DataTransferItemList> DataTransferItemList::create(PassRe
fPtrWillBeRawPtr<DataTransfer> dataTransfer, PassRefPtrWillBeRawPtr<DataObject>
list) | 40 PassRefPtrWillBeRawPtr<DataTransferItemList> DataTransferItemList::create(PassRe
fPtrWillBeRawPtr<DataTransfer> dataTransfer, PassRefPtrWillBeRawPtr<DataObject>
list) |
| 39 { | 41 { |
| 40 return adoptRefWillBeNoop(new DataTransferItemList(dataTransfer, list)); | 42 return adoptRefWillBeNoop(new DataTransferItemList(dataTransfer, list)); |
| 41 } | 43 } |
| 42 | 44 |
| 43 DataTransferItemList::~DataTransferItemList() | |
| 44 { | |
| 45 } | |
| 46 | |
| 47 size_t DataTransferItemList::length() const | 45 size_t DataTransferItemList::length() const |
| 48 { | 46 { |
| 49 if (!m_dataTransfer->canReadTypes()) | 47 if (!m_dataTransfer->canReadTypes()) |
| 50 return 0; | 48 return 0; |
| 51 return m_dataObject->length(); | 49 return m_dataObject->length(); |
| 52 } | 50 } |
| 53 | 51 |
| 54 PassRefPtrWillBeRawPtr<DataTransferItem> DataTransferItemList::item(unsigned lon
g index) | 52 PassRefPtrWillBeRawPtr<DataTransferItem> DataTransferItemList::item(unsigned lon
g index) |
| 55 { | 53 { |
| 56 if (!m_dataTransfer->canReadTypes()) | 54 if (!m_dataTransfer->canReadTypes()) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ScriptWrappable::init(this); | 105 ScriptWrappable::init(this); |
| 108 } | 106 } |
| 109 | 107 |
| 110 void DataTransferItemList::trace(Visitor* visitor) | 108 void DataTransferItemList::trace(Visitor* visitor) |
| 111 { | 109 { |
| 112 visitor->trace(m_dataTransfer); | 110 visitor->trace(m_dataTransfer); |
| 113 visitor->trace(m_dataObject); | 111 visitor->trace(m_dataObject); |
| 114 } | 112 } |
| 115 | 113 |
| 116 } // namespace WebCore | 114 } // namespace WebCore |
| OLD | NEW |