OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 2012 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(const String& data, const
String& type) | 94 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(const String& data, const
String& type) |
95 { | 95 { |
96 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromString(t
ype, data); | 96 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromString(t
ype, data); |
97 if (!internalAddStringItem(item)) | 97 if (!internalAddStringItem(item)) |
98 return nullptr; | 98 return nullptr; |
99 return item; | 99 return item; |
100 } | 100 } |
101 | 101 |
102 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(PassRefPtr<File> file) | 102 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(PassRefPtrWillBeRawPtr<Fi
le> file) |
103 { | 103 { |
104 if (!file) | 104 if (!file) |
105 return nullptr; | 105 return nullptr; |
106 | 106 |
107 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromFile(fil
e); | 107 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromFile(fil
e); |
108 m_itemList.append(item); | 108 m_itemList.append(item); |
109 return item; | 109 return item; |
110 } | 110 } |
111 | 111 |
112 void DataObject::clearData(const String& type) | 112 void DataObject::clearData(const String& type) |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 ASSERT(item->kind() == DataObjectItem::FileKind); | 264 ASSERT(item->kind() == DataObjectItem::FileKind); |
265 m_itemList.append(item); | 265 m_itemList.append(item); |
266 } | 266 } |
267 | 267 |
268 void DataObject::trace(Visitor* visitor) | 268 void DataObject::trace(Visitor* visitor) |
269 { | 269 { |
270 visitor->trace(m_itemList); | 270 visitor->trace(m_itemList); |
271 } | 271 } |
272 | 272 |
273 } // namespace WebCore | 273 } // namespace WebCore |
OLD | NEW |