| Index: remoting/protocol/host_message_dispatcher.cc
|
| diff --git a/remoting/protocol/host_message_dispatcher.cc b/remoting/protocol/host_message_dispatcher.cc
|
| index d75de95e197c22a99929ec16d28497c09a66c669..de2a419b079c06e84743d37b7305e25da94e2d17 100644
|
| --- a/remoting/protocol/host_message_dispatcher.cc
|
| +++ b/remoting/protocol/host_message_dispatcher.cc
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/ref_counted.h"
|
| #include "net/base/io_buffer.h"
|
| #include "remoting/base/multiple_array_input_stream.h"
|
| #include "remoting/proto/control.pb.h"
|
| @@ -78,13 +79,24 @@ void HostMessageDispatcher::OnControlMessageReceived(ControlMessage* message) {
|
| new RefCountedMessage<ControlMessage>(message);
|
| if (message->has_suggest_resolution()) {
|
| host_stub_->SuggestResolution(
|
| - message->suggest_resolution(), NewDeleteTask(ref_msg));
|
| + &message->suggest_resolution(), NewDeleteTask(ref_msg));
|
| }
|
| }
|
|
|
| void HostMessageDispatcher::OnEventMessageReceived(
|
| EventMessage* message) {
|
| - // TODO(hclam): Implement.
|
| + scoped_refptr<RefCountedMessage<EventMessage> > ref_msg =
|
| + new RefCountedMessage<EventMessage>(message);
|
| + for (int i = 0; i < message->event_size(); ++i) {
|
| + if (message->event(i).has_key()) {
|
| + input_stub_->InjectKeyEvent(
|
| + &message->event(i).key(), NewDeleteTask(ref_msg));
|
| + }
|
| + if (message->event(i).has_mouse()) {
|
| + input_stub_->InjectMouseEvent(
|
| + &message->event(i).mouse(), NewDeleteTask(ref_msg));
|
| + }
|
| + }
|
| }
|
|
|
| } // namespace protocol
|
|
|