| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 Vector<String> results; | 204 Vector<String> results; |
| 205 for (size_t i = 0; i < m_itemList.size(); ++i) { | 205 for (size_t i = 0; i < m_itemList.size(); ++i) { |
| 206 if (m_itemList[i]->isFilename()) | 206 if (m_itemList[i]->isFilename()) |
| 207 results.append(static_cast<File*>(m_itemList[i]->getAsFile().get())-
>path()); | 207 results.append(static_cast<File*>(m_itemList[i]->getAsFile().get())-
>path()); |
| 208 } | 208 } |
| 209 return results; | 209 return results; |
| 210 } | 210 } |
| 211 | 211 |
| 212 void DataObject::addFilename(const String& filename, const String& displayName) | 212 void DataObject::addFilename(const String& filename, const String& displayName) |
| 213 { | 213 { |
| 214 internalAddFileItem(DataObjectItem::createFromFile(File::createWithName(file
name, displayName, File::AllContentTypes))); | 214 internalAddFileItem(DataObjectItem::createFromFile(File::createForUserProvid
edFile(filename, displayName))); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) | 217 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) |
| 218 { | 218 { |
| 219 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, buffer)); | 219 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, buffer)); |
| 220 } | 220 } |
| 221 | 221 |
| 222 DataObject::DataObject() | 222 DataObject::DataObject() |
| 223 : m_modifierKeyState(0) | 223 : m_modifierKeyState(0) |
| 224 { | 224 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 m_itemList.append(item); | 257 m_itemList.append(item); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void DataObject::trace(Visitor* visitor) | 260 void DataObject::trace(Visitor* visitor) |
| 261 { | 261 { |
| 262 visitor->trace(m_itemList); | 262 visitor->trace(m_itemList); |
| 263 WillBeHeapSupplementable<DataObject>::trace(visitor); | 263 WillBeHeapSupplementable<DataObject>::trace(visitor); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |