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

Unified Diff: webkit/glue/webclipboard_impl.cc

Issue 8802004: Enable custom MIME types in web copy/paste. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webclipboard_impl.cc
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 4f2dd9936179233482eae71c0cd5a2f827e3b776..000fea18899280e181656b64f57e1a871bd73acf 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -5,6 +5,7 @@
#include "webkit/glue/webclipboard_impl.h"
#include "base/logging.h"
+#include "base/pickle.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
@@ -18,7 +19,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/clipboard/custom_data_helper.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
+#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webkit_glue.h"
#if WEBKIT_USING_CG
@@ -243,9 +246,13 @@ void WebClipboardImpl::writeDataObject(const WebDragData& data) {
// The same is true of the other WebClipboard::write* methods.
ScopedClipboardWriterGlue scw(client_);
+ WebDropData data_object(data);
// TODO(dcheng): Properly support text/uri-list here.
- scw.WriteText(data.plainText());
- scw.WriteHTML(data.htmlText(), "");
+ scw.WriteText(data_object.plain_text);
+ scw.WriteHTML(data_object.text_html, "");
+ Pickle pickle;
+ ui::WriteCustomDataToPickle(data_object.custom_data, &pickle);
+ scw.WritePickledData(pickle, ui::Clipboard::GetWebCustomDataFormatType());
}
bool WebClipboardImpl::ConvertBufferType(Buffer buffer,
« no previous file with comments | « ui/base/clipboard/clipboard_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698