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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // | 56 // |
57 // This object implements an enumeration interface. The existence of an | 57 // This object implements an enumeration interface. The existence of an |
58 // implementation of this interface is exposed to clients through | 58 // implementation of this interface is exposed to clients through |
59 // OSExchangeData's EnumFormatEtc method. Our implementation is nobody's | 59 // OSExchangeData's EnumFormatEtc method. Our implementation is nobody's |
60 // business but our own, so it lives in this file. | 60 // business but our own, so it lives in this file. |
61 // | 61 // |
62 // This Windows API is truly a gem. It wants to be an enumerator but assumes | 62 // This Windows API is truly a gem. It wants to be an enumerator but assumes |
63 // some sort of sequential data (why not just use an array?). See comments | 63 // some sort of sequential data (why not just use an array?). See comments |
64 // throughout. | 64 // throughout. |
65 // | 65 // |
66 class FormatEtcEnumerator FINAL : public IEnumFORMATETC { | 66 class FormatEtcEnumerator final : public IEnumFORMATETC { |
67 public: | 67 public: |
68 FormatEtcEnumerator(DataObjectImpl::StoredData::const_iterator begin, | 68 FormatEtcEnumerator(DataObjectImpl::StoredData::const_iterator begin, |
69 DataObjectImpl::StoredData::const_iterator end); | 69 DataObjectImpl::StoredData::const_iterator end); |
70 ~FormatEtcEnumerator(); | 70 ~FormatEtcEnumerator(); |
71 | 71 |
72 // IEnumFORMATETC implementation: | 72 // IEnumFORMATETC implementation: |
73 HRESULT __stdcall Next( | 73 HRESULT __stdcall Next( |
74 ULONG count, FORMATETC* elements_array, ULONG* elements_fetched); | 74 ULONG count, FORMATETC* elements_array, ULONG* elements_fetched); |
75 HRESULT __stdcall Skip(ULONG skip_count); | 75 HRESULT __stdcall Skip(ULONG skip_count); |
76 HRESULT __stdcall Reset(); | 76 HRESULT __stdcall Reset(); |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | 1048 |
1049 /////////////////////////////////////////////////////////////////////////////// | 1049 /////////////////////////////////////////////////////////////////////////////// |
1050 // OSExchangeData, public: | 1050 // OSExchangeData, public: |
1051 | 1051 |
1052 // static | 1052 // static |
1053 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 1053 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
1054 return new OSExchangeDataProviderWin(); | 1054 return new OSExchangeDataProviderWin(); |
1055 } | 1055 } |
1056 | 1056 |
1057 } // namespace ui | 1057 } // namespace ui |
OLD | NEW |