Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: ui/base/clipboard/clipboard.h

Issue 8775025: Add glue for supporting custom MIME types in DataTransfer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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,
sky 2011/12/02 16:06:27 when you wrap each param should be on its own line
160 string16* result) 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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698