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

Unified Diff: ui/base/clipboard/scoped_clipboard_writer.cc

Issue 740003003: Revert of Rewrite clipboard write IPC handling to be easier to understand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.h ('k') | ui/base/test/test_clipboard.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/scoped_clipboard_writer.cc
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index bf1867beeb66e2b90135489fb54b59139b724f2c..50a7ba39fec8544eec497a55c851387c578a3909 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -86,23 +86,6 @@
objects_[Clipboard::CBF_WEBKIT] = Clipboard::ObjectMapParams();
}
-void ScopedClipboardWriter::WriteImage(const SkBitmap& bitmap) {
- if (bitmap.drawsNothing()) {
- NOTREACHED();
- return;
- }
- bitmap_ = bitmap;
- // TODO(dcheng): This is slightly less horrible than what we used to do, but
- // only very slightly less.
- SkBitmap* bitmap_pointer = &bitmap_;
- Clipboard::ObjectMapParam packed_pointer;
- packed_pointer.resize(sizeof(bitmap_pointer));
- *reinterpret_cast<SkBitmap**>(&*packed_pointer.begin()) = bitmap_pointer;
- Clipboard::ObjectMapParams parameters;
- parameters.push_back(packed_pointer);
- objects_[Clipboard::CBF_SMBITMAP] = parameters;
-}
-
void ScopedClipboardWriter::WritePickledData(
const Pickle& pickle, const Clipboard::FormatType& format) {
std::string format_string = format.Serialize();
@@ -123,7 +106,6 @@
void ScopedClipboardWriter::Reset() {
url_text_.clear();
objects_.clear();
- bitmap_.reset();
}
void ScopedClipboardWriter::WriteTextOrURL(const base::string16& text,
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.h ('k') | ui/base/test/test_clipboard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698