Index: remoting/host/client_session.cc |
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc |
index 6ff6164add558a5ff006bc22d5a38b0f5ea16f77..3f63d8ab89f68252444cb27af601e32a923d9708 100644 |
--- a/remoting/host/client_session.cc |
+++ b/remoting/host/client_session.cc |
@@ -22,17 +22,20 @@ static const int64 kRemoteBlockTimeoutMillis = 2000; |
namespace remoting { |
+using protocol::ClipboardEvent; |
Sergey Ulanov
2012/03/14 20:27:07
There is only one place when this is used, so mayb
simonmorris
2012/03/14 21:20:21
Done.
|
using protocol::KeyEvent; |
using protocol::MouseEvent; |
ClientSession::ClientSession( |
EventHandler* event_handler, |
protocol::ConnectionToClient* connection, |
+ protocol::ClipboardStub* clipboard_stub, |
protocol::InputStub* input_stub, |
Capturer* capturer) |
: event_handler_(event_handler), |
connection_(connection), |
client_jid_(connection->session()->jid()), |
+ clipboard_stub_(clipboard_stub), |
input_stub_(input_stub), |
capturer_(capturer), |
authenticated_(false), |
@@ -43,6 +46,7 @@ ClientSession::ClientSession( |
// TODO(sergeyu): Currently ConnectionToClient expects stubs to be |
// set before channels are connected. Make it possible to set stubs |
// later and set them only when connection is authenticated. |
+ connection_->set_clipboard_stub(this); |
connection_->set_host_stub(this); |
connection_->set_input_stub(this); |
} |
@@ -50,6 +54,14 @@ ClientSession::ClientSession( |
ClientSession::~ClientSession() { |
} |
+void ClientSession::InjectClipboardEvent(const ClipboardEvent& event) { |
+ DCHECK(CalledOnValidThread()); |
+ |
+ if (authenticated_) { |
+ clipboard_stub_->InjectClipboardEvent(event); |
+ } |
+} |
+ |
void ClientSession::InjectKeyEvent(const KeyEvent& event) { |
DCHECK(CalledOnValidThread()); |