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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_win.cc

Issue 11444013: Get drag and drop working for win aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data_provider_win.cc
===================================================================
--- ui/base/dragdrop/os_exchange_data_provider_win.cc (revision 171879)
+++ ui/base/dragdrop/os_exchange_data_provider_win.cc (working copy)
@@ -327,6 +327,16 @@
data_->contents_.push_back(info);
}
+void OSExchangeDataProviderWin::SetFilenames(
+ const std::vector<OSExchangeData::FileInfo>& filenames) {
+ for (size_t i = 0; i < filenames.size(); ++i) {
+ STGMEDIUM* storage = GetStorageForFileName(filenames[i].path);
+ DataObjectImpl::StoredDataInfo* info =
+ new DataObjectImpl::StoredDataInfo(CF_HDROP, storage);
+ data_->contents_.push_back(info);
+ }
+}
+
void OSExchangeDataProviderWin::SetPickledData(CLIPFORMAT format,
const Pickle& data) {
STGMEDIUM* storage = GetStorageForBytes(static_cast<const char*>(data.data()),
@@ -395,6 +405,18 @@
return success;
}
+bool OSExchangeDataProviderWin::GetFilenames(
+ std::vector<OSExchangeData::FileInfo>* filenames) const {
+ std::vector<string16> filenames_local;
+ bool success = ClipboardUtil::GetFilenames(source_object_, &filenames_local);
+ if (success) {
+ for (size_t i = 0; i < filenames_local.size(); ++i)
+ filenames->push_back(
+ OSExchangeData::FileInfo(FilePath(filenames_local[i]), FilePath()));
+ }
+ return success;
+}
+
bool OSExchangeDataProviderWin::GetPickledData(CLIPFORMAT format,
Pickle* data) const {
DCHECK(data);
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698