| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 5 #ifndef SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| 6 #define SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 6 #define SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| 7 | 7 |
| 8 #include "base/scoped_clipboard_writer.h" | 8 #include "base/scoped_clipboard_writer.h" |
| 9 | 9 |
| 10 class SkBitmap; | 10 class SkBitmap; |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class SharedMemory; | 13 class SharedMemory; |
| 14 } | 14 } |
| 15 | 15 |
| 16 class ScopedClipboardWriterGlue : public ScopedClipboardWriter { | 16 class ScopedClipboardWriterGlue : public ScopedClipboardWriter { |
| 17 public: | 17 public: |
| 18 ScopedClipboardWriterGlue(Clipboard* clipboard) | 18 ScopedClipboardWriterGlue(Clipboard* clipboard) |
| 19 : ScopedClipboardWriter(clipboard), | 19 : ScopedClipboardWriter(clipboard), |
| 20 shared_buf_(NULL) { | 20 shared_buf_(NULL) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 ~ScopedClipboardWriterGlue(); | 23 ~ScopedClipboardWriterGlue(); |
| 24 | 24 |
| 25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
| 26 void ScopedClipboardWriterGlue::WriteBitmap(const SkBitmap& bitmap); | 26 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 base::SharedMemory* shared_buf_; | 30 base::SharedMemory* shared_buf_; |
| 31 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); | 31 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 #endif // SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 34 #endif // SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| OLD | NEW |