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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataObject.cpp

Issue 2457523003: Support 'insertReplacementText' for spellcheck (Closed)
Patch Set: Created 4 years, 2 months 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: third_party/WebKit/Source/core/clipboard/DataObject.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataObject.cpp b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
index 023c4a163beb0ea6c3ed72f51cd8986d3d3693af..3fd9de842e4f1ffed0d8a9f694dd33a9079ab377 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObject.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
@@ -62,6 +62,12 @@ DataObject* DataObject::createFromPasteboard(PasteMode pasteMode) {
return dataObject;
}
+DataObject* DataObject::createFromString(const String& data) {
+ DataObject* dataObject = create();
+ dataObject->add(data, "text/plain");
chongz 2016/10/27 16:41:24 Can we import |mimeTypeTextPlain| from "ClipboardM
chaopeng 2016/10/28 00:33:08 Do we have any better head file? Cause this is not
chongz 2016/10/28 02:12:16 Will see if yosin@ has some suggestions.
+ return dataObject;
+}
+
DataObject* DataObject::create() {
return new DataObject;
}

Powered by Google App Engine
This is Rietveld 408576698