Chromium Code Reviews| Index: ui/base/dragdrop/os_exchange_data_provider_mac.h |
| diff --git a/ui/base/dragdrop/os_exchange_data_provider_mac.h b/ui/base/dragdrop/os_exchange_data_provider_mac.h |
| index 378602923a97eeb0f38ccd4c0a2081a6c0a26304..5fe8a3cb81b6ef3d2039232ad72b9c8a5ed91e7f 100644 |
| --- a/ui/base/dragdrop/os_exchange_data_provider_mac.h |
| +++ b/ui/base/dragdrop/os_exchange_data_provider_mac.h |
| @@ -5,12 +5,19 @@ |
| #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_ |
| #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_ |
| +#include "base/event_types.h" |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #import "ui/base/clipboard/clipboard_util_mac.h" |
| #include "ui/base/dragdrop/os_exchange_data.h" |
| +#include "ui/events/event.h" |
| +#include "ui/gfx/geometry/vector2d.h" |
| +#include "ui/gfx/image/image_skia.h" |
| @class NSPasteboard; |
| +@class NSArray; |
| +@class NSData; |
| +@class NSString; |
| namespace ui { |
| class UniquePasteboard; |
| @@ -32,6 +39,9 @@ class UI_BASE_EXPORT OSExchangeDataProviderMac |
| void SetFilenames(const std::vector<FileInfo>& filenames) override; |
| void SetPickledData(const Clipboard::FormatType& format, |
| const base::Pickle& data) override; |
| + void SetDragImage(const gfx::ImageSkia& image, |
|
tapted
2016/05/24 08:06:00
nit: move down after HasCustomFormat() -- generall
spqchan
2016/05/26 01:56:53
Done.
|
| + const gfx::Vector2d& cursor_offset) override; |
| + void SetEvent(const Event& event) override; |
| bool GetString(base::string16* data) const override; |
| bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, |
| GURL* url, |
| @@ -40,14 +50,34 @@ class UI_BASE_EXPORT OSExchangeDataProviderMac |
| bool GetFilenames(std::vector<FileInfo>* filenames) const override; |
| bool GetPickledData(const Clipboard::FormatType& format, |
| base::Pickle* data) const override; |
| + const gfx::ImageSkia& GetDragImage() const override; |
| + const gfx::Vector2d& GetDragImageOffset() const override; |
| + const Event* GetEvent() const override; |
| + NSData* GetNSDataForType(NSString* type) const; |
|
tapted
2016/05/24 08:06:00
non-overrides should be separate (move below, with
spqchan
2016/05/26 01:56:53
Done.
|
| bool HasString() const override; |
| bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; |
| bool HasFile() const override; |
| bool HasCustomFormat(const Clipboard::FormatType& format) const override; |
| + // Returns an array containing the types of data currently contained in |
| + // the pasteboard. |
| + NSArray* GetPasteboardTypes() const; |
| + |
| + // Creates an OSExchangeData object from the given NSPasteboard object. |
| + static std::unique_ptr<OSExchangeData> CreateDataFromPasteboard( |
| + NSPasteboard*); |
| + |
| + // Returns an array of pasteboard types that can be supported by |
| + // OSExchangeData. |
| + static NSArray* SupportedPasteboardTypes(); |
| + |
| private: |
| explicit OSExchangeDataProviderMac(scoped_refptr<ui::UniquePasteboard>); |
| scoped_refptr<ui::UniquePasteboard> pasteboard_; |
| + std::unique_ptr<Event> event_; |
| + |
| + gfx::ImageSkia drag_image_; |
| + gfx::Vector2d cursor_offset_; |
| DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderMac); |
| }; |