Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / base / clipboard / clipboard_android.h
blob660475a9828d115d1d8e5708641c1d823eaf0e5d
1 // Copyright 2014 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 UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_
6 #define UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_
8 #include "ui/base/clipboard/clipboard.h"
10 #include <jni.h>
12 namespace ui {
14 bool RegisterClipboardAndroid(JNIEnv* env);
16 class ClipboardAndroid : public Clipboard {
17 private:
18 friend class Clipboard;
20 ClipboardAndroid();
21 ~ClipboardAndroid() override;
23 // Clipboard overrides:
24 uint64 GetSequenceNumber(ClipboardType type) const override;
25 bool IsFormatAvailable(const FormatType& format,
26 ClipboardType type) const override;
27 void Clear(ClipboardType type) override;
28 void ReadAvailableTypes(ClipboardType type,
29 std::vector<base::string16>* types,
30 bool* contains_filenames) const override;
31 void ReadText(ClipboardType type, base::string16* result) const override;
32 void ReadAsciiText(ClipboardType type, std::string* result) const override;
33 void ReadHTML(ClipboardType type,
34 base::string16* markup,
35 std::string* src_url,
36 uint32* fragment_start,
37 uint32* fragment_end) const override;
38 void ReadRTF(ClipboardType type, std::string* result) const override;
39 SkBitmap ReadImage(ClipboardType type) const override;
40 void ReadCustomData(ClipboardType clipboard_type,
41 const base::string16& type,
42 base::string16* result) const override;
43 void ReadBookmark(base::string16* title, std::string* url) const override;
44 void ReadData(const FormatType& format, std::string* result) const override;
45 void WriteObjects(ClipboardType type, const ObjectMap& objects) override;
46 void WriteText(const char* text_data, size_t text_len) override;
47 void WriteHTML(const char* markup_data,
48 size_t markup_len,
49 const char* url_data,
50 size_t url_len) override;
51 void WriteRTF(const char* rtf_data, size_t data_len) override;
52 void WriteBookmark(const char* title_data,
53 size_t title_len,
54 const char* url_data,
55 size_t url_len) override;
56 void WriteWebSmartPaste() override;
57 void WriteBitmap(const SkBitmap& bitmap) override;
58 void WriteData(const FormatType& format,
59 const char* data_data,
60 size_t data_len) override;
62 DISALLOW_COPY_AND_ASSIGN(ClipboardAndroid);
65 } // namespace ui
67 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_ANDROID_H_