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

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

Issue 1062803003: Enable async mode for DownloadURL drags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: !! Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | 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
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index 3b614bc15618736b9376ba580eb160c20941be19..63c8a6989641e8e94c00f628788f51c418e6de42 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -531,6 +531,9 @@ void OSExchangeDataProviderWin::SetDownloadFileInfo(
Clipboard::GetCFHDropFormatType().ToFormatEtc(), storage);
info->downloader = download.downloader;
data_->contents_.push_back(info);
+
+ // Adding a download file always enables async mode.
+ data_->SetAsyncMode(VARIANT_TRUE);
}
void OSExchangeDataProviderWin::SetDragImage(
@@ -820,17 +823,17 @@ HRESULT DataObjectImpl::EndOperation(
}
HRESULT DataObjectImpl::GetAsyncMode(BOOL* is_op_async) {
- *is_op_async = in_async_mode_ ? TRUE : FALSE;
+ *is_op_async = in_async_mode_ ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
HRESULT DataObjectImpl::InOperation(BOOL* in_async_op) {
- *in_async_op = async_operation_started_ ? TRUE : FALSE;
+ *in_async_op = async_operation_started_ ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
HRESULT DataObjectImpl::SetAsyncMode(BOOL do_op_async) {
- in_async_mode_ = (do_op_async == TRUE);
+ in_async_mode_ = !!do_op_async;
return S_OK;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698