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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void TakeOwnershipOfSelection() const; | 49 void TakeOwnershipOfSelection() const; |
50 | 50 |
51 // Retrieves a list of types we're offering. Noop if we haven't taken the | 51 // Retrieves a list of types we're offering. Noop if we haven't taken the |
52 // selection. | 52 // selection. |
53 void RetrieveTargets(std::vector<Atom>* targets) const; | 53 void RetrieveTargets(std::vector<Atom>* targets) const; |
54 | 54 |
55 // Makes a copy of the format map currently being offered. | 55 // Makes a copy of the format map currently being offered. |
56 SelectionFormatMap GetFormatMap() const; | 56 SelectionFormatMap GetFormatMap() const; |
57 | 57 |
58 // Overridden from OSExchangeData::Provider: | 58 // Overridden from OSExchangeData::Provider: |
59 virtual void SetString(const string16& data) OVERRIDE; | 59 virtual void SetString(const base::string16& data) OVERRIDE; |
60 virtual void SetURL(const GURL& url, const string16& title) OVERRIDE; | 60 virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE; |
61 virtual void SetFilename(const base::FilePath& path) OVERRIDE; | 61 virtual void SetFilename(const base::FilePath& path) OVERRIDE; |
62 virtual void SetFilenames( | 62 virtual void SetFilenames( |
63 const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE; | 63 const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE; |
64 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, | 64 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, |
65 const Pickle& data) OVERRIDE; | 65 const Pickle& data) OVERRIDE; |
66 virtual bool GetString(string16* data) const OVERRIDE; | 66 virtual bool GetString(base::string16* data) const OVERRIDE; |
67 virtual bool GetURLAndTitle(GURL* url, string16* title) const OVERRIDE; | 67 virtual bool GetURLAndTitle(GURL* url, base::string16* title) const OVERRIDE; |
68 virtual bool GetFilename(base::FilePath* path) const OVERRIDE; | 68 virtual bool GetFilename(base::FilePath* path) const OVERRIDE; |
69 virtual bool GetFilenames( | 69 virtual bool GetFilenames( |
70 std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE; | 70 std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE; |
71 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, | 71 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, |
72 Pickle* data) const OVERRIDE; | 72 Pickle* data) const OVERRIDE; |
73 virtual bool HasString() const OVERRIDE; | 73 virtual bool HasString() const OVERRIDE; |
74 virtual bool HasURL() const OVERRIDE; | 74 virtual bool HasURL() const OVERRIDE; |
75 virtual bool HasFile() const OVERRIDE; | 75 virtual bool HasFile() const OVERRIDE; |
76 virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const | 76 virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const |
77 OVERRIDE; | 77 OVERRIDE; |
78 | 78 |
79 virtual void SetHtml(const string16& html, const GURL& base_url) OVERRIDE; | 79 virtual void SetHtml(const base::string16& html, |
80 virtual bool GetHtml(string16* html, GURL* base_url) const OVERRIDE; | 80 const GURL& base_url) OVERRIDE; |
| 81 virtual bool GetHtml(base::string16* html, GURL* base_url) const OVERRIDE; |
81 virtual bool HasHtml() const OVERRIDE; | 82 virtual bool HasHtml() const OVERRIDE; |
82 virtual void SetDragImage(const gfx::ImageSkia& image, | 83 virtual void SetDragImage(const gfx::ImageSkia& image, |
83 const gfx::Vector2d& cursor_offset) OVERRIDE; | 84 const gfx::Vector2d& cursor_offset) OVERRIDE; |
84 virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE; | 85 virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE; |
85 virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE; | 86 virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE; |
86 | 87 |
87 // Overridden from base::MessagePumpDispatcher: | 88 // Overridden from base::MessagePumpDispatcher: |
88 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 89 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
89 | 90 |
90 private: | 91 private: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 125 |
125 // Takes a snapshot of |format_map_| and offers it to other windows. | 126 // Takes a snapshot of |format_map_| and offers it to other windows. |
126 mutable SelectionOwner selection_owner_; | 127 mutable SelectionOwner selection_owner_; |
127 | 128 |
128 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11); | 129 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11); |
129 }; | 130 }; |
130 | 131 |
131 } // namespace ui | 132 } // namespace ui |
132 | 133 |
133 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ | 134 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ |
OLD | NEW |