1 // Copyright (c) 2012 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.
4 
5 #ifndef REMOTING_HOST_CLIPBOARD_H_
6 #define REMOTING_HOST_CLIPBOARD_H_
7 
8 #include <memory>
9 #include <string>
10 
11 #include "base/callback.h"
12 
13 namespace remoting {
14 
15 namespace protocol {
16 class ClipboardEvent;
17 class ClipboardStub;
18 }  // namespace protocol
19 
20 // All Clipboard methods should be run on the UI thread, so that the Clipboard
21 // can get change notifications.
22 class Clipboard {
23  public:
~Clipboard()24   virtual ~Clipboard() {}
25 
26   // Initialises any objects needed to read from or write to the clipboard.
27   virtual void Start(
28       std::unique_ptr<protocol::ClipboardStub> client_clipboard) = 0;
29 
30   // Writes an item to the clipboard. It must be called after Start().
31   virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0;
32 
33   static std::unique_ptr<Clipboard> Create();
34 };
35 
36 }  // namespace remoting
37 
38 #endif  // REMOTING_HOST_CLIPBOARD_H_
39