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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 destination->pstg->AddRef(); | 619 destination->pstg->AddRef(); |
620 break; | 620 break; |
621 } | 621 } |
622 | 622 |
623 destination->tymed = source->tymed; | 623 destination->tymed = source->tymed; |
624 destination->pUnkForRelease = source->pUnkForRelease; | 624 destination->pUnkForRelease = source->pUnkForRelease; |
625 if (destination->pUnkForRelease) | 625 if (destination->pUnkForRelease) |
626 destination->pUnkForRelease->AddRef(); | 626 destination->pUnkForRelease->AddRef(); |
627 } | 627 } |
628 | 628 |
| 629 DataObjectImpl::StoredDataInfo::StoredDataInfo(const FORMATETC& format_etc, |
| 630 STGMEDIUM* medium) |
| 631 : format_etc(format_etc), medium(medium), owns_medium(true) { |
| 632 } |
| 633 |
| 634 DataObjectImpl::StoredDataInfo::~StoredDataInfo() { |
| 635 if (owns_medium) { |
| 636 ReleaseStgMedium(medium); |
| 637 delete medium; |
| 638 } |
| 639 if (downloader.get()) |
| 640 downloader->Stop(); |
| 641 } |
| 642 |
629 DataObjectImpl::DataObjectImpl() | 643 DataObjectImpl::DataObjectImpl() |
630 : is_aborting_(false), | 644 : is_aborting_(false), |
631 in_drag_loop_(false), | 645 in_drag_loop_(false), |
632 in_async_mode_(false), | 646 in_async_mode_(false), |
633 async_operation_started_(false), | 647 async_operation_started_(false), |
634 observer_(NULL) { | 648 observer_(NULL) { |
635 } | 649 } |
636 | 650 |
637 DataObjectImpl::~DataObjectImpl() { | 651 DataObjectImpl::~DataObjectImpl() { |
638 StopDownloads(); | 652 StopDownloads(); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 | 1065 |
1052 /////////////////////////////////////////////////////////////////////////////// | 1066 /////////////////////////////////////////////////////////////////////////////// |
1053 // OSExchangeData, public: | 1067 // OSExchangeData, public: |
1054 | 1068 |
1055 // static | 1069 // static |
1056 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 1070 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
1057 return new OSExchangeDataProviderWin(); | 1071 return new OSExchangeDataProviderWin(); |
1058 } | 1072 } |
1059 | 1073 |
1060 } // namespace ui | 1074 } // namespace ui |
OLD | NEW |