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

Side by Side Diff: Source/WebCore/platform/win/ClipboardWin.cpp

Issue 10821032: Merge 123495 - Files from drag and file <input> should use getMIMETypeForExtension to determine con… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 | « Source/WebCore/platform/qt/ClipboardQt.cpp ('k') | no next file » | 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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal)); 554 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal));
555 if (!hdrop) 555 if (!hdrop)
556 return files.release(); 556 return files.release();
557 557
558 WCHAR filename[MAX_PATH]; 558 WCHAR filename[MAX_PATH];
559 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); 559 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0);
560 for (UINT i = 0; i < fileCount; i++) { 560 for (UINT i = 0; i < fileCount; i++) {
561 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) 561 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename)))
562 continue; 562 continue;
563 files->append(File::create(reinterpret_cast<UChar*>(filename))); 563 files->append(File::create(reinterpret_cast<UChar*>(filename), File: :AllContentTypes));
564 } 564 }
565 565
566 GlobalUnlock(medium.hGlobal); 566 GlobalUnlock(medium.hGlobal);
567 ReleaseStgMedium(&medium); 567 ReleaseStgMedium(&medium);
568 return files.release(); 568 return files.release();
569 } 569 }
570 if (!m_dragDataMap.contains(cfHDropFormat()->cfFormat)) 570 if (!m_dragDataMap.contains(cfHDropFormat()->cfFormat))
571 return files.release(); 571 return files.release();
572 Vector<String> filesVector = m_dragDataMap.get(cfHDropFormat()->cfFormat); 572 Vector<String> filesVector = m_dragDataMap.get(cfHDropFormat()->cfFormat);
573 for (Vector<String>::iterator it = filesVector.begin(); it != filesVector.en d(); ++it) 573 for (Vector<String>::iterator it = filesVector.begin(); it != filesVector.en d(); ++it)
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 void ClipboardWin::setExternalDataObject(IDataObject *dataObject) 807 void ClipboardWin::setExternalDataObject(IDataObject *dataObject)
808 { 808 {
809 ASSERT(isForDragAndDrop()); 809 ASSERT(isForDragAndDrop());
810 810
811 m_writableDataObject = 0; 811 m_writableDataObject = 0;
812 m_dataObject = dataObject; 812 m_dataObject = dataObject;
813 } 813 }
814 814
815 } // namespace WebCore 815 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/qt/ClipboardQt.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698