| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 if (!data.filesystemId().isNull()) | 299 if (!data.filesystemId().isNull()) |
| 300 DraggedIsolatedFileSystem::prepareForDataObject(dataObject, data.filesys
temId()); | 300 DraggedIsolatedFileSystem::prepareForDataObject(dataObject, data.filesys
temId()); |
| 301 return dataObject; | 301 return dataObject; |
| 302 } | 302 } |
| 303 | 303 |
| 304 WebDragData DataObject::toWebDragData() | 304 WebDragData DataObject::toWebDragData() |
| 305 { | 305 { |
| 306 WebDragData data; | 306 WebDragData data; |
| 307 data.initialize(); | 307 data.initialize(); |
| 308 data.setModifierKeyState(m_modifiers); |
| 308 WebVector<WebDragData::Item> itemList(length()); | 309 WebVector<WebDragData::Item> itemList(length()); |
| 309 | 310 |
| 310 for (size_t i = 0; i < length(); ++i) { | 311 for (size_t i = 0; i < length(); ++i) { |
| 311 DataObjectItem* originalItem = item(i); | 312 DataObjectItem* originalItem = item(i); |
| 312 WebDragData::Item item; | 313 WebDragData::Item item; |
| 313 if (originalItem->kind() == DataObjectItem::StringKind) { | 314 if (originalItem->kind() == DataObjectItem::StringKind) { |
| 314 item.storageType = WebDragData::Item::StorageTypeString; | 315 item.storageType = WebDragData::Item::StorageTypeString; |
| 315 item.stringType = originalItem->type(); | 316 item.stringType = originalItem->type(); |
| 316 item.stringData = originalItem->getAsString(); | 317 item.stringData = originalItem->getAsString(); |
| 317 } else if (originalItem->kind() == DataObjectItem::FileKind) { | 318 } else if (originalItem->kind() == DataObjectItem::FileKind) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 347 } | 348 } |
| 348 item.title = originalItem->title(); | 349 item.title = originalItem->title(); |
| 349 item.baseURL = originalItem->baseURL(); | 350 item.baseURL = originalItem->baseURL(); |
| 350 itemList[i] = item; | 351 itemList[i] = item; |
| 351 } | 352 } |
| 352 data.swapItems(itemList); | 353 data.swapItems(itemList); |
| 353 return data; | 354 return data; |
| 354 } | 355 } |
| 355 | 356 |
| 356 } // namespace blink | 357 } // namespace blink |
| OLD | NEW |