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

Unified Diff: remoting/protocol/host_control_dispatcher.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/host_control_dispatcher.h ('k') | remoting/protocol/host_event_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/host_control_dispatcher.cc
diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc
index 44f302cac06c9f8ebda194bffc910ca77ebd3b3b..d3210a60da6cb04bb192f3c5d458fe9057ea434d 100644
--- a/remoting/protocol/host_control_dispatcher.cc
+++ b/remoting/protocol/host_control_dispatcher.cc
@@ -10,6 +10,7 @@
#include "remoting/proto/control.pb.h"
#include "remoting/proto/internal.pb.h"
#include "remoting/protocol/buffered_socket_writer.h"
+#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/util.h"
@@ -18,6 +19,7 @@ namespace protocol {
HostControlDispatcher::HostControlDispatcher()
: ChannelDispatcherBase(kControlChannelName),
+ clipboard_stub_(NULL),
host_stub_(NULL),
writer_(new BufferedSocketWriter(base::MessageLoopProxy::current())) {
}
@@ -34,9 +36,16 @@ void HostControlDispatcher::OnInitialized() {
void HostControlDispatcher::OnMessageReceived(
ControlMessage* message, const base::Closure& done_task) {
+ DCHECK(clipboard_stub_);
DCHECK(host_stub_);
- LOG(WARNING) << "Unknown control message received.";
- done_task.Run();
+
+ base::ScopedClosureRunner done_runner(done_task);
+
+ if (message->has_clipboard_event()) {
+ clipboard_stub_->InjectClipboardEvent(message->clipboard_event());
+ } else {
+ LOG(WARNING) << "Unknown control message received.";
+ }
}
} // namespace protocol
« no previous file with comments | « remoting/protocol/host_control_dispatcher.h ('k') | remoting/protocol/host_event_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698