| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 { | 202 { |
| 203 Vector<String> results; | 203 Vector<String> results; |
| 204 for (size_t i = 0; i < m_itemList.size(); ++i) | 204 for (size_t i = 0; i < m_itemList.size(); ++i) |
| 205 if (m_itemList[i]->isFilename()) | 205 if (m_itemList[i]->isFilename()) |
| 206 results.append(static_cast<File*>(m_itemList[i]->getAsFile().get())-
>path()); | 206 results.append(static_cast<File*>(m_itemList[i]->getAsFile().get())-
>path()); |
| 207 return results; | 207 return results; |
| 208 } | 208 } |
| 209 | 209 |
| 210 void ChromiumDataObject::addFilename(const String& filename, const String& displ
ayName) | 210 void ChromiumDataObject::addFilename(const String& filename, const String& displ
ayName) |
| 211 { | 211 { |
| 212 internalAddFileItem(ChromiumDataObjectItem::createFromFile(File::createWithN
ame(filename, displayName, File::AllContentTypes))); | 212 internalAddFileItem(ChromiumDataObjectItem::createFromFile(File::createWithN
ame(filename, displayName))); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void ChromiumDataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBu
ffer> buffer) | 215 void ChromiumDataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBu
ffer> buffer) |
| 216 { | 216 { |
| 217 internalAddFileItem(ChromiumDataObjectItem::createFromSharedBuffer(name, buf
fer)); | 217 internalAddFileItem(ChromiumDataObjectItem::createFromSharedBuffer(name, buf
fer)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 ChromiumDataObject::ChromiumDataObject() | 220 ChromiumDataObject::ChromiumDataObject() |
| 221 : m_modifierKeyState(0) | 221 : m_modifierKeyState(0) |
| 222 { | 222 { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 249 return true; | 249 return true; |
| 250 } | 250 } |
| 251 | 251 |
| 252 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) | 252 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) |
| 253 { | 253 { |
| 254 ASSERT(item->kind() == DataTransferItem::kindFile); | 254 ASSERT(item->kind() == DataTransferItem::kindFile); |
| 255 m_itemList.append(item); | 255 m_itemList.append(item); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace WebCore | 258 } // namespace WebCore |
| OLD | NEW |