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

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: rebase 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
« no previous file with comments | « webkit/glue/scoped_clipboard_writer_glue.h ('k') | webkit/glue/webclipboard_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/scoped_clipboard_writer_glue.h"
6
7 ScopedClipboardWriterGlue::ScopedClipboardWriterGlue(
8 webkit_glue::ClipboardClient* client)
9 : ui::ScopedClipboardWriter(client->GetClipboard()),
10 context_(client->CreateWriteContext()) {
11 }
12
13 ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
14 if (context_)
15 context_->FlushAndDestroy(objects_);
16 }
17
18 void ScopedClipboardWriterGlue::WriteBitmapFromPixels(const void* pixels,
19 const gfx::Size& size) {
20 if (context_) {
21 context_->WriteBitmapFromPixels(&objects_, pixels, size);
22 } else {
23 ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
24 }
25 }
OLDNEW
« no previous file with comments | « webkit/glue/scoped_clipboard_writer_glue.h ('k') | webkit/glue/webclipboard_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698