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_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ |
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 15 matching lines...) Expand all Loading... |
26 class GURL; | 26 class GURL; |
27 class Pickle; | 27 class Pickle; |
28 | 28 |
29 namespace gfx { | 29 namespace gfx { |
30 class ImageSkia; | 30 class ImageSkia; |
31 class Vector2d; | 31 class Vector2d; |
32 } | 32 } |
33 | 33 |
34 namespace ui { | 34 namespace ui { |
35 | 35 |
| 36 struct FileInfo; |
| 37 |
36 /////////////////////////////////////////////////////////////////////////////// | 38 /////////////////////////////////////////////////////////////////////////////// |
37 // | 39 // |
38 // OSExchangeData | 40 // OSExchangeData |
39 // An object that holds interchange data to be sent out to OS services like | 41 // An object that holds interchange data to be sent out to OS services like |
40 // clipboard, drag and drop, etc. This object exposes an API that clients can | 42 // clipboard, drag and drop, etc. This object exposes an API that clients can |
41 // use to specify raw data and its high level type. This object takes care of | 43 // use to specify raw data and its high level type. This object takes care of |
42 // translating that into something the OS can understand. | 44 // translating that into something the OS can understand. |
43 // | 45 // |
44 /////////////////////////////////////////////////////////////////////////////// | 46 /////////////////////////////////////////////////////////////////////////////// |
45 | 47 |
(...skipping 29 matching lines...) Expand all Loading... |
75 // Encapsulates the info about a file to be downloaded. | 77 // Encapsulates the info about a file to be downloaded. |
76 struct UI_BASE_EXPORT DownloadFileInfo { | 78 struct UI_BASE_EXPORT DownloadFileInfo { |
77 DownloadFileInfo(const base::FilePath& filename, | 79 DownloadFileInfo(const base::FilePath& filename, |
78 DownloadFileProvider* downloader); | 80 DownloadFileProvider* downloader); |
79 ~DownloadFileInfo(); | 81 ~DownloadFileInfo(); |
80 | 82 |
81 base::FilePath filename; | 83 base::FilePath filename; |
82 scoped_refptr<DownloadFileProvider> downloader; | 84 scoped_refptr<DownloadFileProvider> downloader; |
83 }; | 85 }; |
84 | 86 |
85 // Encapsulates the info about a file. | |
86 struct UI_BASE_EXPORT FileInfo { | |
87 FileInfo(const base::FilePath& path, const base::FilePath& display_name); | |
88 ~FileInfo(); | |
89 | |
90 // The path of the file. | |
91 base::FilePath path; | |
92 // The display name of the file. This field is optional. | |
93 base::FilePath display_name; | |
94 }; | |
95 | |
96 // Provider defines the platform specific part of OSExchangeData that | 87 // Provider defines the platform specific part of OSExchangeData that |
97 // interacts with the native system. | 88 // interacts with the native system. |
98 class UI_BASE_EXPORT Provider { | 89 class UI_BASE_EXPORT Provider { |
99 public: | 90 public: |
100 Provider() {} | 91 Provider() {} |
101 virtual ~Provider() {} | 92 virtual ~Provider() {} |
102 | 93 |
103 virtual Provider* Clone() const = 0; | 94 virtual Provider* Clone() const = 0; |
104 | 95 |
105 virtual void MarkOriginatedFromRenderer() = 0; | 96 virtual void MarkOriginatedFromRenderer() = 0; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 private: | 233 private: |
243 // Provides the actual data. | 234 // Provides the actual data. |
244 scoped_ptr<Provider> provider_; | 235 scoped_ptr<Provider> provider_; |
245 | 236 |
246 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); | 237 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); |
247 }; | 238 }; |
248 | 239 |
249 } // namespace ui | 240 } // namespace ui |
250 | 241 |
251 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 242 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ |
OLD | NEW |