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

Unified Diff: remoting/protocol/client_control_dispatcher.cc

Issue 9921034: [Chromoting] Add plumbing to carry clipboard events from the host to the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: remoting/protocol/client_control_dispatcher.cc
diff --git a/remoting/protocol/client_control_dispatcher.cc b/remoting/protocol/client_control_dispatcher.cc
index b1aefc2f3da0c6c2bcfaa249afedae16dae9c2d8..b6e8250d761319adfb89d3e4b6ba864c5f4242fe 100644
--- a/remoting/protocol/client_control_dispatcher.cc
+++ b/remoting/protocol/client_control_dispatcher.cc
@@ -21,6 +21,7 @@ namespace protocol {
ClientControlDispatcher::ClientControlDispatcher()
: ChannelDispatcherBase(kControlChannelName),
client_stub_(NULL),
+ clipboard_stub_(NULL),
writer_(new BufferedSocketWriter(base::MessageLoopProxy::current())) {
}
@@ -45,8 +46,14 @@ void ClientControlDispatcher::InjectClipboardEvent(
void ClientControlDispatcher::OnMessageReceived(
scoped_ptr<ControlMessage> message, const base::Closure& done_task) {
DCHECK(client_stub_);
+ DCHECK(clipboard_stub_);
Wez 2012/03/30 22:20:15 not for this CL: It feels like these checks belong
simonmorris 2012/03/30 22:36:07 Could be, though the stubs are used here.
Wez 2012/03/31 00:38:46 True. Checking in OnMessageReceived() risks us mi
base::ScopedClosureRunner done_runner(done_task);
- LOG(WARNING) << "Unknown control message received.";
+
+ if (message->has_clipboard_event()) {
+ clipboard_stub_->InjectClipboardEvent(message->clipboard_event());
+ } else {
+ LOG(WARNING) << "Unknown control message received.";
+ }
}
} // namespace protocol

Powered by Google App Engine
This is Rietveld 408576698