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

Unified Diff: remoting/protocol/channel_dispatcher_base.cc

Issue 2164163002: Simplify data channel creation logic in WebRTC-based protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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/channel_dispatcher_base.h ('k') | remoting/protocol/connection_tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/channel_dispatcher_base.cc
diff --git a/remoting/protocol/channel_dispatcher_base.cc b/remoting/protocol/channel_dispatcher_base.cc
index 97f3be5e4857ae9076d177b159acdea79b33658d..399c2f32b39474e2c2afcef8ad1713499c86bacc 100644
--- a/remoting/protocol/channel_dispatcher_base.cc
+++ b/remoting/protocol/channel_dispatcher_base.cc
@@ -42,7 +42,11 @@ void ChannelDispatcherBase::OnChannelReady(
channel_factory_ = nullptr;
message_pipe_ = std::move(message_pipe);
message_pipe_->Start(this);
+}
+void ChannelDispatcherBase::OnMessagePipeOpen() {
+ DCHECK(!is_connected_);
+ is_connected_ = true;
event_handler_->OnChannelInitialized(this);
}
@@ -52,6 +56,7 @@ void ChannelDispatcherBase::OnMessageReceived(
}
void ChannelDispatcherBase::OnMessagePipeClosed() {
+ is_connected_ = false;
event_handler_->OnChannelClosed(this);
}
« no previous file with comments | « remoting/protocol/channel_dispatcher_base.h ('k') | remoting/protocol/connection_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698