blob: e1194ef73b055928ab40e4dba5ef05d5e3bbeb23 [file] [log] [blame]
Avi Drissmand6cdf9b2022-09-15 19:52:531// Copyright 2012 The Chromium Authors
[email protected]6d17db92012-05-11 17:03:142// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef REMOTING_HOST_CLIPBOARD_H_
6#define REMOTING_HOST_CLIPBOARD_H_
7
dcheng0765c492016-04-06 22:41:538#include <memory>
[email protected]6d17db92012-05-11 17:03:149#include <string>
10
Avi Drissman135261e2023-01-11 22:43:1511#include "base/functional/callback.h"
[email protected]6d17db92012-05-11 17:03:1412
13namespace remoting {
14
15namespace protocol {
16class ClipboardEvent;
[email protected]7f44ba42012-05-31 20:26:2917class ClipboardStub;
[email protected]6d17db92012-05-11 17:03:1418} // namespace protocol
19
[email protected]98f99a02012-05-16 18:03:3220// All Clipboard methods should be run on the UI thread, so that the Clipboard
21// can get change notifications.
[email protected]6d17db92012-05-11 17:03:1422class Clipboard {
23 public:
[email protected]e19c2fc02012-07-10 01:18:2024 virtual ~Clipboard() {}
[email protected]6d17db92012-05-11 17:03:1425
26 // Initialises any objects needed to read from or write to the clipboard.
dcheng0765c492016-04-06 22:41:5327 virtual void Start(
28 std::unique_ptr<protocol::ClipboardStub> client_clipboard) = 0;
[email protected]6d17db92012-05-11 17:03:1429
[email protected]98f99a02012-05-16 18:03:3230 // Writes an item to the clipboard. It must be called after Start().
[email protected]6d17db92012-05-11 17:03:1431 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0;
32
dcheng0765c492016-04-06 22:41:5333 static std::unique_ptr<Clipboard> Create();
[email protected]6d17db92012-05-11 17:03:1434};
35
36} // namespace remoting
37
38#endif // REMOTING_HOST_CLIPBOARD_H_