| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 if (!data.filesystemId().isNull()) | 291 if (!data.filesystemId().isNull()) |
| 292 DraggedIsolatedFileSystem::prepareForDataObject(dataObject, data.filesys
temId()); | 292 DraggedIsolatedFileSystem::prepareForDataObject(dataObject, data.filesys
temId()); |
| 293 return dataObject; | 293 return dataObject; |
| 294 } | 294 } |
| 295 | 295 |
| 296 WebDragData DataObject::toWebDragData() | 296 WebDragData DataObject::toWebDragData() |
| 297 { | 297 { |
| 298 WebDragData data; | 298 WebDragData data; |
| 299 data.initialize(); | 299 data.initialize(); |
| 300 data.setModifierKeyState(m_modifiers); |
| 300 WebVector<WebDragData::Item> itemList(length()); | 301 WebVector<WebDragData::Item> itemList(length()); |
| 301 | 302 |
| 302 for (size_t i = 0; i < length(); ++i) { | 303 for (size_t i = 0; i < length(); ++i) { |
| 303 DataObjectItem* originalItem = item(i); | 304 DataObjectItem* originalItem = item(i); |
| 304 WebDragData::Item item; | 305 WebDragData::Item item; |
| 305 if (originalItem->kind() == DataObjectItem::StringKind) { | 306 if (originalItem->kind() == DataObjectItem::StringKind) { |
| 306 item.storageType = WebDragData::Item::StorageTypeString; | 307 item.storageType = WebDragData::Item::StorageTypeString; |
| 307 item.stringType = originalItem->type(); | 308 item.stringType = originalItem->type(); |
| 308 item.stringData = originalItem->getAsString(); | 309 item.stringData = originalItem->getAsString(); |
| 309 } else if (originalItem->kind() == DataObjectItem::FileKind) { | 310 } else if (originalItem->kind() == DataObjectItem::FileKind) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 339 } | 340 } |
| 340 item.title = originalItem->title(); | 341 item.title = originalItem->title(); |
| 341 item.baseURL = originalItem->baseURL(); | 342 item.baseURL = originalItem->baseURL(); |
| 342 itemList[i] = item; | 343 itemList[i] = item; |
| 343 } | 344 } |
| 344 data.swapItems(itemList); | 345 data.swapItems(itemList); |
| 345 return data; | 346 return data; |
| 346 } | 347 } |
| 347 | 348 |
| 348 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |