OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CLIPBOARD_CLIPBOARD_H_ | 5 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 #endif | 132 #endif |
133 | 133 |
134 // Tests whether the clipboard contains a certain format | 134 // Tests whether the clipboard contains a certain format |
135 bool IsFormatAvailable(const FormatType& format, Buffer buffer) const; | 135 bool IsFormatAvailable(const FormatType& format, Buffer buffer) const; |
136 | 136 |
137 // As above, but instead of interpreting |format| by some platform-specific | 137 // As above, but instead of interpreting |format| by some platform-specific |
138 // definition, interpret it as a literal MIME type. | 138 // definition, interpret it as a literal MIME type. |
139 bool IsFormatAvailableByString(const std::string& format, | 139 bool IsFormatAvailableByString(const std::string& format, |
140 Buffer buffer) const; | 140 Buffer buffer) const; |
141 | 141 |
| 142 void ReadAvailableTypes(Buffer buffer, std::vector<string16>* types, |
| 143 bool* contains_filenames) const; |
| 144 |
142 // Reads UNICODE text from the clipboard, if available. | 145 // Reads UNICODE text from the clipboard, if available. |
143 void ReadText(Buffer buffer, string16* result) const; | 146 void ReadText(Buffer buffer, string16* result) const; |
144 | 147 |
145 // Reads ASCII text from the clipboard, if available. | 148 // Reads ASCII text from the clipboard, if available. |
146 void ReadAsciiText(Buffer buffer, std::string* result) const; | 149 void ReadAsciiText(Buffer buffer, std::string* result) const; |
147 | 150 |
148 // Reads HTML from the clipboard, if available. | 151 // Reads HTML from the clipboard, if available. |
149 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url) const; | 152 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url) const; |
150 | 153 |
151 // Reads an image from the clipboard, if available. The returned data will be | 154 // Reads an image from the clipboard, if available. The returned data will be |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 GtkClipboard* clipboard_; | 274 GtkClipboard* clipboard_; |
272 GtkClipboard* primary_selection_; | 275 GtkClipboard* primary_selection_; |
273 #endif | 276 #endif |
274 | 277 |
275 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 278 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
276 }; | 279 }; |
277 | 280 |
278 } // namespace ui | 281 } // namespace ui |
279 | 282 |
280 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 283 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |