#pragma once #include #include #include class WSClipboard { public: static WSClipboard& the(); ~WSClipboard(); bool has_data() const { return m_shared_buffer; } const String& data_type() const { return m_data_type; } const u8* data() const; int size() const; void clear(); void set_data(NonnullRefPtr&&, int contents_size, const String& data_type); Function on_content_change; private: WSClipboard(); String m_data_type; RefPtr m_shared_buffer; int m_contents_size { 0 }; };