mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
Clipboard+LibGUI: Move clipboard service to anonymous files
This commit is contained in:
parent
1cb44ec5ee
commit
5522e8f59d
6 changed files with 21 additions and 60 deletions
|
@ -44,14 +44,10 @@ Storage::~Storage()
|
|||
{
|
||||
}
|
||||
|
||||
void Storage::set_data(NonnullRefPtr<SharedBuffer> data, size_t data_size, const String& mime_type, const HashMap<String, String>& metadata)
|
||||
void Storage::set_data(Core::AnonymousBuffer data, const String& mime_type, const HashMap<String, String>& metadata)
|
||||
{
|
||||
dbg() << "Storage::set_data <- [" << mime_type << "] " << data->data<void>() << " (" << data_size << " bytes)";
|
||||
for (auto& it : metadata) {
|
||||
dbg() << " " << it.key << ": " << it.value;
|
||||
}
|
||||
m_shared_buffer = move(data);
|
||||
m_data_size = data_size;
|
||||
m_buffer = move(data);
|
||||
m_data_size = data.size();
|
||||
m_mime_type = mime_type;
|
||||
m_metadata = metadata;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue