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

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

Issue 423283003: Fix userVisibility() for files dragged into the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed 2nd round of feedback. Created 6 years, 4 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 | « no previous file | Source/core/clipboard/DataObjectTest.cpp » ('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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/clipboard/DataObjectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698