Chromium Code Reviews| 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> |
| 11 | 11 |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include <objidl.h> | 15 #include <objidl.h> |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 #include "base/event_types.h" | |
| 18 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
| 19 #include "base/macros.h" | 20 #include "base/macros.h" |
| 20 #include "ui/base/clipboard/clipboard.h" | 21 #include "ui/base/clipboard/clipboard.h" |
| 21 #include "ui/base/dragdrop/download_file_interface.h" | 22 #include "ui/base/dragdrop/download_file_interface.h" |
| 22 #include "ui/base/ui_base_export.h" | 23 #include "ui/base/ui_base_export.h" |
| 24 #include "ui/events/event.h" | |
| 23 | 25 |
| 24 class GURL; | 26 class GURL; |
| 25 | 27 |
| 26 namespace base { | 28 namespace base { |
| 27 class Pickle; | 29 class Pickle; |
| 28 } | 30 } |
| 29 | 31 |
| 30 namespace gfx { | 32 namespace gfx { |
| 31 class ImageSkia; | 33 class ImageSkia; |
| 32 class Vector2d; | 34 class Vector2d; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 virtual bool GetHtml(base::string16* html, GURL* base_url) const = 0; | 131 virtual bool GetHtml(base::string16* html, GURL* base_url) const = 0; |
| 130 virtual bool HasHtml() const = 0; | 132 virtual bool HasHtml() const = 0; |
| 131 #endif | 133 #endif |
| 132 | 134 |
| 133 #if defined(USE_AURA) | 135 #if defined(USE_AURA) |
| 134 virtual void SetDragImage(const gfx::ImageSkia& image, | 136 virtual void SetDragImage(const gfx::ImageSkia& image, |
| 135 const gfx::Vector2d& cursor_offset) = 0; | 137 const gfx::Vector2d& cursor_offset) = 0; |
| 136 virtual const gfx::ImageSkia& GetDragImage() const = 0; | 138 virtual const gfx::ImageSkia& GetDragImage() const = 0; |
| 137 virtual const gfx::Vector2d& GetDragImageOffset() const = 0; | 139 virtual const gfx::Vector2d& GetDragImageOffset() const = 0; |
| 138 #endif | 140 #endif |
| 141 | |
| 142 #if defined(OS_MACOSX) | |
| 143 virtual void SetDragImage(const gfx::ImageSkia& image) = 0; | |
|
tapted
2016/05/11 12:36:15
it's probably nicer to expose the existing Aura me
spqchan
2016/05/23 21:26:21
I added defined(OS_MACOSX), I ran into some troubl
| |
| 144 virtual const gfx::ImageSkia& GetDragImage() const = 0; | |
| 145 virtual void SetNativeEvent(const base::NativeEvent& event) = 0; | |
| 146 virtual const base::NativeEvent& GetNativeEvent() const = 0; | |
| 147 #endif | |
| 139 }; | 148 }; |
| 140 | 149 |
| 141 // Creates the platform specific Provider. | 150 // Creates the platform specific Provider. |
| 142 static Provider* CreateProvider(); | 151 static Provider* CreateProvider(); |
| 143 | 152 |
| 144 OSExchangeData(); | 153 OSExchangeData(); |
| 145 // Creates an OSExchangeData with the specified provider. OSExchangeData | 154 // Creates an OSExchangeData with the specified provider. OSExchangeData |
| 146 // takes ownership of the supplied provider. | 155 // takes ownership of the supplied provider. |
| 147 explicit OSExchangeData(Provider* provider); | 156 explicit OSExchangeData(Provider* provider); |
| 148 | 157 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 private: | 239 private: |
| 231 // Provides the actual data. | 240 // Provides the actual data. |
| 232 std::unique_ptr<Provider> provider_; | 241 std::unique_ptr<Provider> provider_; |
| 233 | 242 |
| 234 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); | 243 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); |
| 235 }; | 244 }; |
| 236 | 245 |
| 237 } // namespace ui | 246 } // namespace ui |
| 238 | 247 |
| 239 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 248 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ |
| OLD | NEW |