OLD | NEW |
1 // Copyright (c) 2011 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 WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
6 #define WEBKIT_GLUE_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 #include "base/memory/scoped_ptr.h" |
9 #include "webkit/glue/clipboard_client.h" | 10 #include "webkit/glue/clipboard_client.h" |
10 | 11 |
11 class ScopedClipboardWriterGlue : public ui::ScopedClipboardWriter { | 12 class ScopedClipboardWriterGlue : public ui::ScopedClipboardWriter { |
12 public: | 13 public: |
13 explicit ScopedClipboardWriterGlue(webkit_glue::ClipboardClient* client); | 14 explicit ScopedClipboardWriterGlue(webkit_glue::ClipboardClient* client); |
14 | 15 |
15 ~ScopedClipboardWriterGlue(); | 16 ~ScopedClipboardWriterGlue(); |
16 | 17 |
17 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); | 18 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); |
18 | 19 |
19 private: | 20 private: |
20 webkit_glue::ClipboardClient::WriteContext* context_; | 21 scoped_ptr<webkit_glue::ClipboardClient::WriteContext> context_; |
21 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); | 22 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue); |
22 }; | 23 }; |
23 | 24 |
24 #endif // WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ | 25 #endif // WEBKIT_GLUE_SCOPED_CLIPBOARD_WRITER_GLUE_H_ |
OLD | NEW |