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

Unified Diff: webkit/glue/webclipboard_impl.cc

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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webclipboard_impl.cc
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 42b76cf54ee9512dc56b0547340985714c0bc281..3a98bc2effe442affc6f990556811c69f798852b 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -173,6 +173,17 @@ WebData WebClipboardImpl::readImage(Buffer buffer) {
return WebData(png_data);
}
+WebString WebClipboardImpl::readCustomData(Buffer buffer,
+ const WebString& type) {
+ ui::Clipboard::Buffer buffer_type;
+ if (!ConvertBufferType(buffer, &buffer_type))
+ return WebString();
+
+ string16 data;
+ client_->ReadCustomData(buffer_type, type, &data);
+ return data;
+}
+
void WebClipboardImpl::writeHTML(
const WebString& html_text, const WebURL& source_url,
const WebString& plain_text, bool write_smart_paste) {

Powered by Google App Engine
This is Rietveld 408576698