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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 if (source->ptd) { | 112 if (source->ptd) { |
113 source->ptd = | 113 source->ptd = |
114 static_cast<DVTARGETDEVICE*>(CoTaskMemAlloc(sizeof(DVTARGETDEVICE))); | 114 static_cast<DVTARGETDEVICE*>(CoTaskMemAlloc(sizeof(DVTARGETDEVICE))); |
115 *(clone->ptd) = *(source->ptd); | 115 *(clone->ptd) = *(source->ptd); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 FormatEtcEnumerator::FormatEtcEnumerator( | 119 FormatEtcEnumerator::FormatEtcEnumerator( |
120 DataObjectImpl::StoredData::const_iterator start, | 120 DataObjectImpl::StoredData::const_iterator start, |
121 DataObjectImpl::StoredData::const_iterator end) | 121 DataObjectImpl::StoredData::const_iterator end) |
122 : ref_count_(0), cursor_(0) { | 122 : cursor_(0), ref_count_(0) { |
123 // Copy FORMATETC data from our source into ourselves. | 123 // Copy FORMATETC data from our source into ourselves. |
124 while (start != end) { | 124 while (start != end) { |
125 FORMATETC* format_etc = new FORMATETC; | 125 FORMATETC* format_etc = new FORMATETC; |
126 CloneFormatEtc(&(*start)->format_etc, format_etc); | 126 CloneFormatEtc(&(*start)->format_etc, format_etc); |
127 contents_.push_back(format_etc); | 127 contents_.push_back(format_etc); |
128 ++start; | 128 ++start; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 FormatEtcEnumerator::~FormatEtcEnumerator() { | 132 FormatEtcEnumerator::~FormatEtcEnumerator() { |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 | 1065 |
1066 /////////////////////////////////////////////////////////////////////////////// | 1066 /////////////////////////////////////////////////////////////////////////////// |
1067 // OSExchangeData, public: | 1067 // OSExchangeData, public: |
1068 | 1068 |
1069 // static | 1069 // static |
1070 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 1070 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
1071 return new OSExchangeDataProviderWin(); | 1071 return new OSExchangeDataProviderWin(); |
1072 } | 1072 } |
1073 | 1073 |
1074 } // namespace ui | 1074 } // namespace ui |
OLD | NEW |