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

Unified Diff: remoting/protocol/connection_to_client.cc

Issue 9646013: Add the plumbing that will carry a clipboard item from a chromoting client to a host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remoting_simple_host. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client.cc
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index b88cb06c4301b566be4940fcf93ed751d31ac72a..8226b1fb81677356b00c657dfc326686be9837ff 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -9,6 +9,7 @@
#include "base/message_loop_proxy.h"
#include "google/protobuf/message.h"
#include "net/base/io_buffer.h"
+#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/host_control_dispatcher.h"
#include "remoting/protocol/host_event_dispatcher.h"
#include "remoting/protocol/host_stub.h"
@@ -19,6 +20,7 @@ namespace protocol {
ConnectionToClient::ConnectionToClient(protocol::Session* session)
: handler_(NULL),
+ clipboard_stub_(NULL),
host_stub_(NULL),
input_stub_(NULL),
session_(session) {
@@ -72,6 +74,12 @@ ClientStub* ConnectionToClient::client_stub() {
return control_dispatcher_.get();
}
+void ConnectionToClient::set_clipboard_stub(
+ protocol::ClipboardStub* clipboard_stub) {
+ DCHECK(CalledOnValidThread());
+ clipboard_stub_ = clipboard_stub;
+}
+
void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) {
DCHECK(CalledOnValidThread());
host_stub_ = host_stub;
@@ -98,6 +106,7 @@ void ConnectionToClient::OnSessionStateChange(Session::State state) {
control_dispatcher_.reset(new HostControlDispatcher());
control_dispatcher_->Init(session_.get(), base::Bind(
&ConnectionToClient::OnChannelInitialized, base::Unretained(this)));
+ control_dispatcher_->set_clipboard_stub(clipboard_stub_);
control_dispatcher_->set_host_stub(host_stub_);
event_dispatcher_.reset(new HostEventDispatcher());
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698