Commit 801c26a4 authored by dcheng's avatar dcheng Committed by Commit bot

Enable async mode for DownloadURL drags.

BUG=390991

Review URL: https://codereview.chromium.org/1062803003

Cr-Commit-Position: refs/heads/master@{#324147}
parent c8824f49
...@@ -531,6 +531,9 @@ void OSExchangeDataProviderWin::SetDownloadFileInfo( ...@@ -531,6 +531,9 @@ void OSExchangeDataProviderWin::SetDownloadFileInfo(
Clipboard::GetCFHDropFormatType().ToFormatEtc(), storage); Clipboard::GetCFHDropFormatType().ToFormatEtc(), storage);
info->downloader = download.downloader; info->downloader = download.downloader;
data_->contents_.push_back(info); data_->contents_.push_back(info);
// Adding a download file always enables async mode.
data_->SetAsyncMode(VARIANT_TRUE);
} }
void OSExchangeDataProviderWin::SetDragImage( void OSExchangeDataProviderWin::SetDragImage(
...@@ -820,17 +823,17 @@ HRESULT DataObjectImpl::EndOperation( ...@@ -820,17 +823,17 @@ HRESULT DataObjectImpl::EndOperation(
} }
HRESULT DataObjectImpl::GetAsyncMode(BOOL* is_op_async) { 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; return S_OK;
} }
HRESULT DataObjectImpl::InOperation(BOOL* in_async_op) { 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; return S_OK;
} }
HRESULT DataObjectImpl::SetAsyncMode(BOOL do_op_async) { HRESULT DataObjectImpl::SetAsyncMode(BOOL do_op_async) {
in_async_mode_ = (do_op_async == TRUE); in_async_mode_ = !!do_op_async;
return S_OK; return S_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment