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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Reads HTML from the clipboard, if available. If the HTML fragment requires | 149 // Reads HTML from the clipboard, if available. If the HTML fragment requires |
150 // context to parse, |fragment_start| and |fragment_end| are indexes into | 150 // context to parse, |fragment_start| and |fragment_end| are indexes into |
151 // markup indicating the beginning and end of the actual fragment. Otherwise, | 151 // markup indicating the beginning and end of the actual fragment. Otherwise, |
152 // they will contain 0 and markup->size(). | 152 // they will contain 0 and markup->size(). |
153 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url, | 153 void ReadHTML(Buffer buffer, string16* markup, std::string* src_url, |
154 uint32* fragment_start, uint32* fragment_end) const; | 154 uint32* fragment_start, uint32* fragment_end) const; |
155 | 155 |
156 // Reads an image from the clipboard, if available. | 156 // Reads an image from the clipboard, if available. |
157 SkBitmap ReadImage(Buffer buffer) const; | 157 SkBitmap ReadImage(Buffer buffer) const; |
158 | 158 |
| 159 void ReadCustomData(Buffer buffer, const string16& type, |
| 160 string16* data) const; |
| 161 |
159 // Reads a bookmark from the clipboard, if available. | 162 // Reads a bookmark from the clipboard, if available. |
160 void ReadBookmark(string16* title, std::string* url) const; | 163 void ReadBookmark(string16* title, std::string* url) const; |
161 | 164 |
162 // Reads a file or group of files from the clipboard, if available, into the | 165 // Reads a file or group of files from the clipboard, if available, into the |
163 // out parameter. | 166 // out parameter. |
164 void ReadFile(FilePath* file) const; | 167 void ReadFile(FilePath* file) const; |
165 void ReadFiles(std::vector<FilePath>* files) const; | 168 void ReadFiles(std::vector<FilePath>* files) const; |
166 | 169 |
167 // Reads raw data from the clipboard with the given format type. Stores result | 170 // Reads raw data from the clipboard with the given format type. Stores result |
168 // as a byte vector. | 171 // as a byte vector. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 static const char kMimeTypeText[]; | 283 static const char kMimeTypeText[]; |
281 static const char kMimeTypeHTML[]; | 284 static const char kMimeTypeHTML[]; |
282 static const char kMimeTypePNG[]; | 285 static const char kMimeTypePNG[]; |
283 | 286 |
284 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 287 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
285 }; | 288 }; |
286 | 289 |
287 } // namespace ui | 290 } // namespace ui |
288 | 291 |
289 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 292 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |