OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |