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

Unified Diff: remoting/protocol/host_event_dispatcher.cc

Issue 841773005: Cleanup channel dispatchers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_event_dispatcher.h ('k') | remoting/protocol/host_video_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « remoting/protocol/host_event_dispatcher.h ('k') | remoting/protocol/host_video_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698