Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #include "webkit/glue/scoped_clipboard_writer_glue.h" | |
| 2 | |
| 3 ScopedClipboardWriterGlue::ScopedClipboardWriterGlue( | |
| 4 webkit_glue::ClipboardClient* client) | |
|
Dirk Pranke
2011/11/21 20:00:54
I realize this is the pre-existing design, but I'm
piman
2011/11/21 20:27:14
There is a single client per webkit instance (i.e.
| |
| 5 : ui::ScopedClipboardWriter(client->GetClipboard()), | |
| 6 context_(client->CreateWriteContext()) { | |
| 7 } | |
| 8 | |
| 9 ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() { | |
| 10 if (context_) | |
| 11 context_->FlushAndDestroy(objects_); | |
| 12 } | |
| 13 void ScopedClipboardWriterGlue::WriteBitmapFromPixels(const void* pixels, | |
| 14 const gfx::Size& size) { | |
| 15 if (context_) { | |
| 16 context_->WriteBitmapFromPixels(&objects_, pixels, size); | |
| 17 } else { | |
| 18 ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size); | |
| 19 } | |
| 20 } | |
| OLD | NEW |