summaryrefslogtreecommitdiffstats
path: root/webkit/glue/scoped_clipboard_writer_glue.h
blob: 7460ddffea727e7593f50d23f45b9ed9f764edba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SCOPED_CLIPBOARD_WRITER_GLUE_H_
#define SCOPED_CLIPBOARD_WRITER_GLUE_H_

#include "app/clipboard/scoped_clipboard_writer.h"

class SkBitmap;

namespace base {
class SharedMemory;
}

class ScopedClipboardWriterGlue : public ScopedClipboardWriter {
 public:
  ScopedClipboardWriterGlue(Clipboard* clipboard)
      : ScopedClipboardWriter(clipboard),
        shared_buf_(NULL) {
  }

  ~ScopedClipboardWriterGlue();

  void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size);

 private:
  base::SharedMemory* shared_buf_;
  DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriterGlue);
};

#endif  // SCOPED_CLIPBOARD_WRITER_GLUE_H_