Index: remoting/protocol/host_message_dispatcher.cc |
diff --git a/remoting/protocol/host_message_dispatcher.cc b/remoting/protocol/host_message_dispatcher.cc |
index 2554c9b2d4d600a42c7a2a2a5c888efb2683bc67..e973b576b3a22ffb4f1a7eb359f4d7420083b33e 100644 |
--- a/remoting/protocol/host_message_dispatcher.cc |
+++ b/remoting/protocol/host_message_dispatcher.cc |
@@ -11,7 +11,7 @@ |
#include "remoting/protocol/host_stub.h" |
#include "remoting/protocol/input_stub.h" |
#include "remoting/protocol/message_reader.h" |
-#include "remoting/protocol/ref_counted_message.h" |
+#include "remoting/protocol/ref_counted_task.h" |
#include "remoting/protocol/session.h" |
namespace remoting { |
@@ -47,33 +47,34 @@ void HostMessageDispatcher::Initialize( |
NewCallback(this, &HostMessageDispatcher::OnControlMessageReceived)); |
} |
-void HostMessageDispatcher::OnControlMessageReceived(ControlMessage* message) { |
- scoped_refptr<RefCountedMessage<ControlMessage> > ref_msg = |
- new RefCountedMessage<ControlMessage>(message); |
+void HostMessageDispatcher::OnControlMessageReceived( |
+ ControlMessage* message, Task* done_task) { |
+ scoped_refptr<RefCountedTask> ref_counted_task = |
+ new RefCountedTask(done_task); |
if (message->has_suggest_resolution()) { |
host_stub_->SuggestResolution( |
- &message->suggest_resolution(), NewDeleteTask(ref_msg)); |
+ &message->suggest_resolution(), NewDeleteTask(ref_counted_task)); |
} else if (message->has_begin_session_request()) { |
host_stub_->BeginSessionRequest( |
&message->begin_session_request().credentials(), |
- NewDeleteTask(ref_msg)); |
+ NewDeleteTask(ref_counted_task)); |
} else { |
NOTREACHED() << "Invalid control message received"; |
} |
} |
void HostMessageDispatcher::OnEventMessageReceived( |
- EventMessage* message) { |
- scoped_refptr<RefCountedMessage<EventMessage> > ref_msg = |
- new RefCountedMessage<EventMessage>(message); |
+ EventMessage* message, Task* done_task) { |
+ scoped_refptr<RefCountedTask> ref_counted_task = |
+ new RefCountedTask(done_task); |
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)); |
+ &message->event(i).key(), NewDeleteTask(ref_counted_task)); |
} |
if (message->event(i).has_mouse()) { |
input_stub_->InjectMouseEvent( |
- &message->event(i).mouse(), NewDeleteTask(ref_msg)); |
+ &message->event(i).mouse(), NewDeleteTask(ref_counted_task)); |
} |
} |
} |