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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return String(); | 62 return String(); |
63 } | 63 } |
64 | 64 |
65 String DataTransferItem::type() const | 65 String DataTransferItem::type() const |
66 { | 66 { |
67 if (!m_dataTransfer->canReadTypes()) | 67 if (!m_dataTransfer->canReadTypes()) |
68 return String(); | 68 return String(); |
69 return m_item->type(); | 69 return m_item->type(); |
70 } | 70 } |
71 | 71 |
72 void DataTransferItem::getAsString(ExecutionContext* context, PassOwnPtrWillBeRa
wPtr<StringCallback> callback) const | 72 void DataTransferItem::getAsString(ExecutionContext* context, StringCallback* ca
llback) const |
73 { | 73 { |
74 if (!m_dataTransfer->canReadData()) | 74 if (!m_dataTransfer->canReadData()) |
75 return; | 75 return; |
76 if (!callback || m_item->kind() != DataObjectItem::StringKind) | 76 if (!callback || m_item->kind() != DataObjectItem::StringKind) |
77 return; | 77 return; |
78 | 78 |
79 StringCallback::scheduleCallback(callback, context, m_item->getAsString(), "
DataTransferItem.getAsString"); | 79 StringCallback::scheduleCallback(callback, context, m_item->getAsString(), "
DataTransferItem.getAsString"); |
80 } | 80 } |
81 | 81 |
82 PassRefPtrWillBeRawPtr<Blob> DataTransferItem::getAsFile() const | 82 PassRefPtrWillBeRawPtr<Blob> DataTransferItem::getAsFile() const |
(...skipping 11 matching lines...) Expand all Loading... |
94 } | 94 } |
95 | 95 |
96 void DataTransferItem::trace(Visitor* visitor) | 96 void DataTransferItem::trace(Visitor* visitor) |
97 { | 97 { |
98 visitor->trace(m_dataTransfer); | 98 visitor->trace(m_dataTransfer); |
99 visitor->trace(m_item); | 99 visitor->trace(m_item); |
100 } | 100 } |
101 | 101 |
102 } // namespace blink | 102 } // namespace blink |
103 | 103 |
OLD | NEW |