Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataObject.cpp

Issue 1411913010: Propagate drag-and-drop key modifiers to WebView's guest renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix initialiser order. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/drop_data_builder.cc ('k') | third_party/WebKit/public/platform/WebDragData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/drop_data_builder.cc ('k') | third_party/WebKit/public/platform/WebDragData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698