| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #endif | 131 #endif |
| 132 | 132 |
| 133 #if defined(USE_AURA) || defined(OS_MACOSX) | 133 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 134 virtual void SetDragImage(const gfx::ImageSkia& image, | 134 virtual void SetDragImage(const gfx::ImageSkia& image, |
| 135 const gfx::Vector2d& cursor_offset) = 0; | 135 const gfx::Vector2d& cursor_offset) = 0; |
| 136 virtual const gfx::ImageSkia& GetDragImage() const = 0; | 136 virtual const gfx::ImageSkia& GetDragImage() const = 0; |
| 137 virtual const gfx::Vector2d& GetDragImageOffset() const = 0; | 137 virtual const gfx::Vector2d& GetDragImageOffset() const = 0; |
| 138 #endif | 138 #endif |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 // Creates the platform specific Provider. | |
| 142 static Provider* CreateProvider(); | |
| 143 | |
| 144 OSExchangeData(); | 141 OSExchangeData(); |
| 145 // Creates an OSExchangeData with the specified provider. OSExchangeData | 142 // Creates an OSExchangeData with the specified provider. OSExchangeData |
| 146 // takes ownership of the supplied provider. | 143 // takes ownership of the supplied provider. |
| 147 explicit OSExchangeData(Provider* provider); | 144 explicit OSExchangeData(Provider* provider); |
| 148 | 145 |
| 149 ~OSExchangeData(); | 146 ~OSExchangeData(); |
| 150 | 147 |
| 151 // Returns the Provider, which actually stores and manages the data. | 148 // Returns the Provider, which actually stores and manages the data. |
| 152 const Provider& provider() const { return *provider_; } | 149 const Provider& provider() const { return *provider_; } |
| 153 Provider& provider() { return *provider_; } | 150 Provider& provider() { return *provider_; } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 private: | 227 private: |
| 231 // Provides the actual data. | 228 // Provides the actual data. |
| 232 std::unique_ptr<Provider> provider_; | 229 std::unique_ptr<Provider> provider_; |
| 233 | 230 |
| 234 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); | 231 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); |
| 235 }; | 232 }; |
| 236 | 233 |
| 237 } // namespace ui | 234 } // namespace ui |
| 238 | 235 |
| 239 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 236 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ |
| OLD | NEW |