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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Reads UNICODE text from the clipboard, if available. | 142 // Reads UNICODE text from the clipboard, if available. |
143 void ReadText(Buffer buffer, string16* result) const; | 143 void ReadText(Buffer buffer, string16* result) const; |
144 | 144 |
145 // Reads ASCII text from the clipboard, if available. | 145 // Reads ASCII text from the clipboard, if available. |
146 void ReadAsciiText(Buffer buffer, std::string* result) const; | 146 void ReadAsciiText(Buffer buffer, std::string* result) const; |
147 | 147 |
148 // Reads HTML from the clipboard, if available. | 148 // Reads HTML from the clipboard, if available. |
149 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url) const; | 149 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url) const; |
150 | 150 |
| 151 // Reads an image from the clipboard, if available. The returned data will be |
| 152 // encoded in PNG format. |
| 153 void ReadImage(Buffer buffer, std::string* data) const; |
| 154 |
151 // Reads a bookmark from the clipboard, if available. | 155 // Reads a bookmark from the clipboard, if available. |
152 void ReadBookmark(string16* title, std::string* url) const; | 156 void ReadBookmark(string16* title, std::string* url) const; |
153 | 157 |
154 // Reads a file or group of files from the clipboard, if available, into the | 158 // Reads a file or group of files from the clipboard, if available, into the |
155 // out parameter. | 159 // out parameter. |
156 void ReadFile(FilePath* file) const; | 160 void ReadFile(FilePath* file) const; |
157 void ReadFiles(std::vector<FilePath>* files) const; | 161 void ReadFiles(std::vector<FilePath>* files) const; |
158 | 162 |
159 // Reads raw data from the clipboard with the given format type. Stores result | 163 // Reads raw data from the clipboard with the given format type. Stores result |
160 // as a byte vector. | 164 // as a byte vector. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 GtkClipboard* clipboard_; | 271 GtkClipboard* clipboard_; |
268 GtkClipboard* primary_selection_; | 272 GtkClipboard* primary_selection_; |
269 #endif | 273 #endif |
270 | 274 |
271 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 275 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
272 }; | 276 }; |
273 | 277 |
274 } // namespace ui | 278 } // namespace ui |
275 | 279 |
276 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 280 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |