forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclipboard_history_item.h
39 lines (29 loc) · 1.2 KB
/
clipboard_history_item.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_CLIPBOARD_CLIPBOARD_HISTORY_ITEM_H_
#define ASH_CLIPBOARD_CLIPBOARD_HISTORY_ITEM_H_
#include "ash/ash_export.h"
#include "base/unguessable_token.h"
#include "ui/base/clipboard/clipboard_data.h"
namespace ash {
// Wraps ClipboardData with a unique identifier.
class ASH_EXPORT ClipboardHistoryItem {
public:
explicit ClipboardHistoryItem(ui::ClipboardData data);
ClipboardHistoryItem(const ClipboardHistoryItem&);
ClipboardHistoryItem(ClipboardHistoryItem&&);
// Copy/move assignment operators are deleted to be consistent with
// ui::ClipboardData and ui::DataTransferEndpoint.
ClipboardHistoryItem& operator=(const ClipboardHistoryItem&) = delete;
ClipboardHistoryItem& operator=(ClipboardHistoryItem&&) = delete;
~ClipboardHistoryItem();
const base::UnguessableToken& id() const { return id_; }
const ui::ClipboardData& data() const { return data_; }
private:
// Unique identifier.
base::UnguessableToken id_;
ui::ClipboardData data_;
};
} // namespace ash
#endif // ASH_CLIPBOARD_CLIPBOARD_HISTORY_ITEM_H_