Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: remoting/host/clipboard.h

Issue 10413060: [Chromoting] Let the Windows IT2Me host send clipboard events to the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use MessageLoopProxy+WeakPtr. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_CLIPBOARD_H_ 5 #ifndef REMOTING_HOST_CLIPBOARD_H_
6 #define REMOTING_HOST_CLIPBOARD_H_ 6 #define REMOTING_HOST_CLIPBOARD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h"
12 #include "remoting/protocol/clipboard_proxy.h"
11 13
12 namespace remoting { 14 namespace remoting {
13 15
14 namespace protocol { 16 namespace protocol {
15 class ClipboardEvent; 17 class ClipboardEvent;
16 } // namespace protocol 18 } // namespace protocol
17 19
18 // All Clipboard methods should be run on the UI thread, so that the Clipboard 20 // All Clipboard methods should be run on the UI thread, so that the Clipboard
19 // can get change notifications. 21 // can get change notifications.
20 class Clipboard { 22 class Clipboard {
21 public: 23 public:
22 virtual ~Clipboard() {}; 24 virtual ~Clipboard() {};
23 25
24 // Initialises any objects needed to read from or write to the clipboard. 26 // Initialises any objects needed to read from or write to the clipboard.
25 virtual void Start() = 0; 27 virtual void Start(
28 const scoped_refptr<protocol::ClipboardProxy>& client_clipboard) = 0;
26 29
27 // Destroys any objects initialised by Start(). 30 // Destroys any objects initialised by Start().
28 virtual void Stop() = 0; 31 virtual void Stop() = 0;
29 32
30 // Writes an item to the clipboard. It must be called after Start(). 33 // Writes an item to the clipboard. It must be called after Start().
31 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0; 34 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0;
32 35
33 static scoped_ptr<Clipboard> Create(); 36 static scoped_ptr<Clipboard> Create();
34 }; 37 };
35 38
36 } // namespace remoting 39 } // namespace remoting
37 40
38 #endif // REMOTING_HOST_CLIPBOARD_H_ 41 #endif // REMOTING_HOST_CLIPBOARD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698