| OLD | NEW |
| 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/scoped_ptr.h" |
| 11 | 12 |
| 12 namespace remoting { | 13 namespace remoting { |
| 13 | 14 |
| 14 namespace protocol { | 15 namespace protocol { |
| 15 class ClipboardEvent; | 16 class ClipboardEvent; |
| 16 class ClipboardStub; | 17 class ClipboardStub; |
| 17 } // namespace protocol | 18 } // namespace protocol |
| 18 | 19 |
| 19 // 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 |
| 20 // can get change notifications. | 21 // can get change notifications. |
| 21 class Clipboard { | 22 class Clipboard { |
| 22 public: | 23 public: |
| 23 virtual ~Clipboard() {} | 24 virtual ~Clipboard() {} |
| 24 | 25 |
| 25 // 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. |
| 26 virtual void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; | 27 virtual void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; |
| 27 | 28 |
| 28 // Writes an item to the clipboard. It must be called after Start(). | 29 // Writes an item to the clipboard. It must be called after Start(). |
| 29 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0; | 30 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0; |
| 30 | 31 |
| 31 static scoped_ptr<Clipboard> Create(); | 32 static scoped_ptr<Clipboard> Create(); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace remoting | 35 } // namespace remoting |
| 35 | 36 |
| 36 #endif // REMOTING_HOST_CLIPBOARD_H_ | 37 #endif // REMOTING_HOST_CLIPBOARD_H_ |
| OLD | NEW |