Add ICU message format support
[chromium-blink-merge.git] / content / renderer / renderer_clipboard_delegate.h
blobef8e034fce9ba8f8513c470d72f68df13a0f23b2
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_DELEGATE_H_
6 #define CONTENT_RENDERER_RENDERER_CLIPBOARD_DELEGATE_H_
8 #include <stdint.h>
9 #include <map>
10 #include <string>
11 #include <vector>
13 #include "base/compiler_specific.h"
14 #include "base/macros.h"
15 #include "base/strings/string16.h"
16 #include "content/common/clipboard_format.h"
17 #include "ui/base/clipboard/clipboard_types.h"
19 class GURL;
20 class SkBitmap;
22 namespace content {
24 // Renderer interface to read/write from the clipboard over IPC.
25 class RendererClipboardDelegate {
26 public:
27 RendererClipboardDelegate();
29 uint64 GetSequenceNumber(ui::ClipboardType type);
30 bool IsFormatAvailable(ClipboardFormat format, ui::ClipboardType type);
31 void Clear(ui::ClipboardType type);
32 void ReadAvailableTypes(ui::ClipboardType type,
33 std::vector<base::string16>* types,
34 bool* contains_filenames);
35 void ReadText(ui::ClipboardType type, base::string16* result);
36 void ReadHTML(ui::ClipboardType type,
37 base::string16* markup,
38 GURL* url,
39 uint32* fragment_start,
40 uint32* fragment_end);
41 void ReadRTF(ui::ClipboardType type, std::string* result);
42 void ReadImage(ui::ClipboardType type, std::string* data);
43 void ReadCustomData(ui::ClipboardType clipboard_type,
44 const base::string16& type,
45 base::string16* data);
47 void WriteText(ui::ClipboardType type, const base::string16& text);
48 void WriteHTML(ui::ClipboardType type,
49 const base::string16& markup,
50 const GURL& url);
51 void WriteSmartPasteMarker(ui::ClipboardType type);
52 void WriteCustomData(ui::ClipboardType type,
53 const std::map<base::string16, base::string16>& data);
54 void WriteBookmark(ui::ClipboardType type,
55 const GURL& url,
56 const base::string16& title);
57 bool WriteImage(ui::ClipboardType type, const SkBitmap& bitmap);
58 void CommitWrite(ui::ClipboardType type);
60 private:
61 DISALLOW_COPY_AND_ASSIGN(RendererClipboardDelegate);
64 } // namespace content
66 #endif // CONTENT_RENDERER_RENDERER_CLIPBOARD_DELEGATE_H_