1 // Copyright (c) 2012 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.
5 #ifndef CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_
6 #define CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_
8 #include "base/compiler_specific.h"
9 #include "content/renderer/clipboard_client.h"
13 // An implementation of ClipboardClient that gets and sends data over IPC.
14 class RendererClipboardClient
: public ClipboardClient
{
16 RendererClipboardClient();
17 virtual ~RendererClipboardClient();
19 virtual ui::Clipboard
* GetClipboard() OVERRIDE
;
20 virtual uint64
GetSequenceNumber(ui::ClipboardType type
) OVERRIDE
;
21 virtual bool IsFormatAvailable(ClipboardFormat format
,
22 ui::ClipboardType type
) OVERRIDE
;
23 virtual void Clear(ui::ClipboardType type
) OVERRIDE
;
24 virtual void ReadAvailableTypes(ui::ClipboardType type
,
25 std::vector
<base::string16
>* types
,
26 bool* contains_filenames
) OVERRIDE
;
27 virtual void ReadText(ui::ClipboardType type
,
28 base::string16
* result
) OVERRIDE
;
29 virtual void ReadHTML(ui::ClipboardType type
,
30 base::string16
* markup
,
32 uint32
* fragment_start
,
33 uint32
* fragment_end
) OVERRIDE
;
34 virtual void ReadRTF(ui::ClipboardType type
, std::string
* result
) OVERRIDE
;
35 virtual void ReadImage(ui::ClipboardType type
, std::string
* data
) OVERRIDE
;
36 virtual void ReadCustomData(ui::ClipboardType clipboard_type
,
37 const base::string16
& type
,
38 base::string16
* data
) OVERRIDE
;
39 virtual WriteContext
* CreateWriteContext() OVERRIDE
;
42 } // namespace content
44 #endif // CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_