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 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
7 | 7 |
8 #include <objidl.h> | 8 #include <objidl.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 // Win8 SDK compatibility, see http://goo.gl/fufvl for more information. | 13 // Win8 SDK compatibility, see http://goo.gl/fufvl for more information. |
14 // "Note: This interface has been renamed IDataObjectAsyncCapability." | 14 // "Note: This interface has been renamed IDataObjectAsyncCapability." |
15 // If we're building on pre-8 we define it to its old name. It's documented as | 15 // If we're building on pre-8 we define it to its old name. It's documented as |
16 // being binary compatible. | 16 // being binary compatible. |
17 #ifndef __IDataObjectAsyncCapability_FWD_DEFINED__ | 17 #ifndef __IDataObjectAsyncCapability_FWD_DEFINED__ |
18 #define IDataObjectAsyncCapability IAsyncOperation | 18 #define IDataObjectAsyncCapability IAsyncOperation |
19 #endif | 19 #endif |
20 | 20 |
21 #include "base/memory/scoped_vector.h" | 21 #include "base/memory/scoped_vector.h" |
22 #include "base/win/scoped_comptr.h" | 22 #include "base/win/scoped_comptr.h" |
23 #include "ui/base/dragdrop/os_exchange_data.h" | 23 #include "ui/base/dragdrop/os_exchange_data.h" |
24 #include "ui/base/ui_export.h" | 24 #include "ui/base/ui_base_export.h" |
25 #include "ui/gfx/image/image_skia.h" | 25 #include "ui/gfx/image/image_skia.h" |
26 #include "ui/gfx/vector2d.h" | 26 #include "ui/gfx/vector2d.h" |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
29 | 29 |
30 class DataObjectImpl : public DownloadFileObserver, | 30 class DataObjectImpl : public DownloadFileObserver, |
31 public IDataObject, | 31 public IDataObject, |
32 public IDataObjectAsyncCapability { | 32 public IDataObjectAsyncCapability { |
33 public: | 33 public: |
34 class Observer { | 34 class Observer { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 base::win::ScopedComPtr<IDataObject> source_object_; | 118 base::win::ScopedComPtr<IDataObject> source_object_; |
119 | 119 |
120 bool is_aborting_; | 120 bool is_aborting_; |
121 bool in_drag_loop_; | 121 bool in_drag_loop_; |
122 bool in_async_mode_; | 122 bool in_async_mode_; |
123 bool async_operation_started_; | 123 bool async_operation_started_; |
124 Observer* observer_; | 124 Observer* observer_; |
125 }; | 125 }; |
126 | 126 |
127 class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider { | 127 class UI_BASE_EXPORT OSExchangeDataProviderWin |
| 128 : public OSExchangeData::Provider { |
128 public: | 129 public: |
129 // Returns true if source has plain text that is a valid url. | 130 // Returns true if source has plain text that is a valid url. |
130 static bool HasPlainTextURL(IDataObject* source); | 131 static bool HasPlainTextURL(IDataObject* source); |
131 | 132 |
132 // Returns true if source has plain text that is a valid URL and sets url to | 133 // Returns true if source has plain text that is a valid URL and sets url to |
133 // that url. | 134 // that url. |
134 static bool GetPlainTextURL(IDataObject* source, GURL* url); | 135 static bool GetPlainTextURL(IDataObject* source, GURL* url); |
135 | 136 |
136 static DataObjectImpl* GetDataObjectImpl(const OSExchangeData& data); | 137 static DataObjectImpl* GetDataObjectImpl(const OSExchangeData& data); |
137 static IDataObject* GetIDataObject(const OSExchangeData& data); | 138 static IDataObject* GetIDataObject(const OSExchangeData& data); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 gfx::ImageSkia drag_image_; | 196 gfx::ImageSkia drag_image_; |
196 gfx::Vector2d drag_image_offset_; | 197 gfx::Vector2d drag_image_offset_; |
197 #endif | 198 #endif |
198 | 199 |
199 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); | 200 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); |
200 }; | 201 }; |
201 | 202 |
202 } // namespace ui | 203 } // namespace ui |
203 | 204 |
204 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ | 205 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ |
OLD | NEW |