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 | |
155 // Reads a bookmark from the clipboard, if available. | 151 // Reads a bookmark from the clipboard, if available. |
156 void ReadBookmark(string16* title, std::string* url) const; | 152 void ReadBookmark(string16* title, std::string* url) const; |
157 | 153 |
158 // Reads a file or group of files from the clipboard, if available, into the | 154 // Reads a file or group of files from the clipboard, if available, into the |
159 // out parameter. | 155 // out parameter. |
160 void ReadFile(FilePath* file) const; | 156 void ReadFile(FilePath* file) const; |
161 void ReadFiles(std::vector<FilePath>* files) const; | 157 void ReadFiles(std::vector<FilePath>* files) const; |
162 | 158 |
163 // Reads raw data from the clipboard with the given format type. Stores result | 159 // Reads raw data from the clipboard with the given format type. Stores result |
164 // as a byte vector. | 160 // as a byte vector. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 GtkClipboard* clipboard_; | 267 GtkClipboard* clipboard_; |
272 GtkClipboard* primary_selection_; | 268 GtkClipboard* primary_selection_; |
273 #endif | 269 #endif |
274 | 270 |
275 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 271 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
276 }; | 272 }; |
277 | 273 |
278 } // namespace ui | 274 } // namespace ui |
279 | 275 |
280 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 276 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |