Index: webkit/glue/webclipboard_impl.cc |
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc |
index 0cbecaf08c57a1b1b028d289bf148a6a6fcffe2c..80b2ae90220613ffb9896a39cdac272b380260fd 100644 |
--- a/webkit/glue/webclipboard_impl.cc |
+++ b/webkit/glue/webclipboard_impl.cc |
@@ -11,6 +11,7 @@ |
#include "net/base/escape.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
@@ -26,6 +27,7 @@ |
using WebKit::WebClipboard; |
using WebKit::WebData; |
+using WebKit::WebDragData; |
using WebKit::WebImage; |
using WebKit::WebString; |
using WebKit::WebURL; |
@@ -220,6 +222,17 @@ void WebClipboardImpl::writeImage( |
} |
} |
+void WebClipboardImpl::writeDataObject(const WebDragData& data) { |
+ // TODO(dcheng): This actually results in a double clear of the clipboard. |
+ // Once in WebKit, and once here when the clipboard writer goes out of scope. |
+ // The same is true of the other WebClipboard::write* methods. |
+ ScopedClipboardWriterGlue scw(ClipboardGetClipboard()); |
+ |
+ // TODO(dcheng): Properly support text/uri-list here. |
+ scw.WriteText(data.plainText()); |
+ scw.WriteHTML(data.htmlText(), ""); |
+} |
+ |
bool WebClipboardImpl::ConvertBufferType(Buffer buffer, |
ui::Clipboard::Buffer* result) { |
switch (buffer) { |