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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 // think we always synthesize one in WebContentsDragWin. 524 // think we always synthesize one in WebContentsDragWin.
525 STGMEDIUM* storage = NULL; 525 STGMEDIUM* storage = NULL;
526 if (!download.filename.empty()) 526 if (!download.filename.empty())
527 storage = GetStorageForFileName(download.filename); 527 storage = GetStorageForFileName(download.filename);
528 528
529 // Add CF_HDROP. 529 // Add CF_HDROP.
530 DataObjectImpl::StoredDataInfo* info = new DataObjectImpl::StoredDataInfo( 530 DataObjectImpl::StoredDataInfo* info = new DataObjectImpl::StoredDataInfo(
531 Clipboard::GetCFHDropFormatType().ToFormatEtc(), storage); 531 Clipboard::GetCFHDropFormatType().ToFormatEtc(), storage);
532 info->downloader = download.downloader; 532 info->downloader = download.downloader;
533 data_->contents_.push_back(info); 533 data_->contents_.push_back(info);
534
535 // Adding a download file always enables async mode.
536 data_->SetAsyncMode(TRUE);
scottmg 2015/04/07 19:38:05 it looks like it should be VARIANT_TRUE from https
dcheng 2015/04/07 21:04:00 Fixed this and several other instances.
534 } 537 }
535 538
536 void OSExchangeDataProviderWin::SetDragImage( 539 void OSExchangeDataProviderWin::SetDragImage(
537 const gfx::ImageSkia& image, 540 const gfx::ImageSkia& image,
538 const gfx::Vector2d& cursor_offset) { 541 const gfx::Vector2d& cursor_offset) {
539 drag_image_ = image; 542 drag_image_ = image;
540 drag_image_offset_ = cursor_offset; 543 drag_image_offset_ = cursor_offset;
541 } 544 }
542 545
543 const gfx::ImageSkia& OSExchangeDataProviderWin::GetDragImage() const { 546 const gfx::ImageSkia& OSExchangeDataProviderWin::GetDragImage() const {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 1050
1048 /////////////////////////////////////////////////////////////////////////////// 1051 ///////////////////////////////////////////////////////////////////////////////
1049 // OSExchangeData, public: 1052 // OSExchangeData, public:
1050 1053
1051 // static 1054 // static
1052 OSExchangeData::Provider* OSExchangeData::CreateProvider() { 1055 OSExchangeData::Provider* OSExchangeData::CreateProvider() {
1053 return new OSExchangeDataProviderWin(); 1056 return new OSExchangeDataProviderWin();
1054 } 1057 }
1055 1058
1056 } // namespace ui 1059 } // namespace ui
OLDNEW
« 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