Index: remoting/protocol/host_event_dispatcher.cc |
diff --git a/remoting/protocol/host_event_dispatcher.cc b/remoting/protocol/host_event_dispatcher.cc |
index 7bc93fb5669e8220d3deb821d2ad409b26d11877..b1addbd8f9c1758b9a83b11e9a0c79f5535d40b9 100644 |
--- a/remoting/protocol/host_event_dispatcher.cc |
+++ b/remoting/protocol/host_event_dispatcher.cc |
@@ -16,19 +16,17 @@ namespace protocol { |
HostEventDispatcher::HostEventDispatcher() |
: ChannelDispatcherBase(kEventChannelName), |
- input_stub_(nullptr) { |
+ input_stub_(nullptr), |
+ parser_(base::Bind(&HostEventDispatcher::OnMessageReceived, |
+ base::Unretained(this)), |
+ reader()) { |
} |
HostEventDispatcher::~HostEventDispatcher() { |
} |
-void HostEventDispatcher::OnInitialized() { |
- reader_.Init(channel(), base::Bind( |
- &HostEventDispatcher::OnMessageReceived, base::Unretained(this))); |
-} |
- |
-void HostEventDispatcher::OnMessageReceived( |
- scoped_ptr<EventMessage> message, const base::Closure& done_task) { |
+void HostEventDispatcher::OnMessageReceived(scoped_ptr<EventMessage> message, |
+ const base::Closure& done_task) { |
DCHECK(input_stub_); |
base::ScopedClosureRunner done_runner(done_task); |