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

Side by Side Diff: webkit/glue/scoped_clipboard_writer_glue.cc

Issue 8591030: Move clipboard-related webkit_glue embedder functions into a ClipboardClient interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698