| 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_AURAX11_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ |
| 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ |
| 7 | 7 |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Overridden from OSExchangeData::Provider: | 63 // Overridden from OSExchangeData::Provider: |
| 64 Provider* Clone() const override; | 64 Provider* Clone() const override; |
| 65 void MarkOriginatedFromRenderer() override; | 65 void MarkOriginatedFromRenderer() override; |
| 66 bool DidOriginateFromRenderer() const override; | 66 bool DidOriginateFromRenderer() const override; |
| 67 void SetString(const base::string16& data) override; | 67 void SetString(const base::string16& data) override; |
| 68 void SetURL(const GURL& url, const base::string16& title) override; | 68 void SetURL(const GURL& url, const base::string16& title) override; |
| 69 void SetFilename(const base::FilePath& path) override; | 69 void SetFilename(const base::FilePath& path) override; |
| 70 void SetFilenames(const std::vector<FileInfo>& filenames) override; | 70 void SetFilenames(const std::vector<FileInfo>& filenames) override; |
| 71 void SetPickledData(const OSExchangeData::CustomFormat& format, | 71 void SetPickledData(const OSExchangeData::CustomFormat& format, |
| 72 const Pickle& pickle) override; | 72 const base::Pickle& pickle) override; |
| 73 bool GetString(base::string16* data) const override; | 73 bool GetString(base::string16* data) const override; |
| 74 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, | 74 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, |
| 75 GURL* url, | 75 GURL* url, |
| 76 base::string16* title) const override; | 76 base::string16* title) const override; |
| 77 bool GetFilename(base::FilePath* path) const override; | 77 bool GetFilename(base::FilePath* path) const override; |
| 78 bool GetFilenames(std::vector<FileInfo>* filenames) const override; | 78 bool GetFilenames(std::vector<FileInfo>* filenames) const override; |
| 79 bool GetPickledData(const OSExchangeData::CustomFormat& format, | 79 bool GetPickledData(const OSExchangeData::CustomFormat& format, |
| 80 Pickle* pickle) const override; | 80 base::Pickle* pickle) const override; |
| 81 bool HasString() const override; | 81 bool HasString() const override; |
| 82 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; | 82 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override; |
| 83 bool HasFile() const override; | 83 bool HasFile() const override; |
| 84 bool HasCustomFormat( | 84 bool HasCustomFormat( |
| 85 const OSExchangeData::CustomFormat& format) const override; | 85 const OSExchangeData::CustomFormat& format) const override; |
| 86 | 86 |
| 87 void SetFileContents(const base::FilePath& filename, | 87 void SetFileContents(const base::FilePath& filename, |
| 88 const std::string& file_contents) override; | 88 const std::string& file_contents) override; |
| 89 | 89 |
| 90 void SetHtml(const base::string16& html, const GURL& base_url) override; | 90 void SetHtml(const base::string16& html, const GURL& base_url) override; |
| 91 bool GetHtml(base::string16* html, GURL* base_url) const override; | 91 bool GetHtml(base::string16* html, GURL* base_url) const override; |
| 92 bool HasHtml() const override; | 92 bool HasHtml() const override; |
| 93 void SetDragImage(const gfx::ImageSkia& image, | 93 void SetDragImage(const gfx::ImageSkia& image, |
| 94 const gfx::Vector2d& cursor_offset) override; | 94 const gfx::Vector2d& cursor_offset) override; |
| 95 const gfx::ImageSkia& GetDragImage() const override; | 95 const gfx::ImageSkia& GetDragImage() const override; |
| 96 const gfx::Vector2d& GetDragImageOffset() const override; | 96 const gfx::Vector2d& GetDragImageOffset() const override; |
| 97 | 97 |
| 98 // ui::PlatformEventDispatcher: | 98 // ui::PlatformEventDispatcher: |
| 99 bool CanDispatchEvent(const PlatformEvent& event) override; | 99 bool CanDispatchEvent(const PlatformEvent& event) override; |
| 100 uint32_t DispatchEvent(const PlatformEvent& event) override; | 100 uint32_t DispatchEvent(const PlatformEvent& event) override; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 friend class OSExchangeDataProviderAuraX11Test; | 103 friend class OSExchangeDataProviderAuraX11Test; |
| 104 typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData; | 104 typedef std::map<OSExchangeData::CustomFormat, base::Pickle> PickleData; |
| 105 | 105 |
| 106 // Returns true if |formats_| contains a string format and the string can be | 106 // Returns true if |formats_| contains a string format and the string can be |
| 107 // parsed as a URL. | 107 // parsed as a URL. |
| 108 bool GetPlainTextURL(GURL* url) const; | 108 bool GetPlainTextURL(GURL* url) const; |
| 109 | 109 |
| 110 // Returns the targets in |format_map_|. | 110 // Returns the targets in |format_map_|. |
| 111 std::vector< ::Atom> GetTargets() const; | 111 std::vector< ::Atom> GetTargets() const; |
| 112 | 112 |
| 113 // Drag image and offset data. | 113 // Drag image and offset data. |
| 114 gfx::ImageSkia drag_image_; | 114 gfx::ImageSkia drag_image_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 140 | 140 |
| 141 // Takes a snapshot of |format_map_| and offers it to other windows. | 141 // Takes a snapshot of |format_map_| and offers it to other windows. |
| 142 mutable SelectionOwner selection_owner_; | 142 mutable SelectionOwner selection_owner_; |
| 143 | 143 |
| 144 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11); | 144 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace ui | 147 } // namespace ui |
| 148 | 148 |
| 149 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ | 149 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ |
| OLD | NEW |