| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| 6 #define SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 6 #define WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| 7 | 7 |
| 8 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 8 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 9 | 9 |
| 10 class SkBitmap; | |
| 11 | |
| 12 namespace base { | 10 namespace base { |
| 13 class SharedMemory; | 11 class SharedMemory; |
| 14 } | 12 } |
| 15 | 13 |
| 16 class ScopedClipboardWriterGlue : public ui::ScopedClipboardWriter { | 14 class ScopedClipboardWriterGlue : public ui::ScopedClipboardWriter { |
| 17 public: | 15 public: |
| 18 ScopedClipboardWriterGlue(ui::Clipboard* clipboard) | 16 explicit ScopedClipboardWriterGlue(ui::Clipboard* clipboard) |
| 19 : ui::ScopedClipboardWriter(clipboard), | 17 : ui::ScopedClipboardWriter(clipboard), |
| 20 shared_buf_(NULL) { | 18 shared_buf_(NULL) { |
| 21 } | 19 } |
| 22 | 20 |
| 23 ~ScopedClipboardWriterGlue(); | 21 ~ScopedClipboardWriterGlue(); |
| 24 | 22 |
| 25 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); | 23 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); |
| 26 | 24 |
| 27 private: | 25 private: |
| 28 base::SharedMemory* shared_buf_; | 26 base::SharedMemory* shared_buf_; |
| 29 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); | 27 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); |
| 30 }; | 28 }; |
| 31 | 29 |
| 32 #endif // SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 30 #endif // WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
| OLD | NEW |