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

Unified Diff: remoting/protocol/channel_dispatcher_base.h

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 | « no previous file | remoting/protocol/channel_dispatcher_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/channel_dispatcher_base.h
diff --git a/remoting/protocol/channel_dispatcher_base.h b/remoting/protocol/channel_dispatcher_base.h
index b22548fabfa9d84636405f50248554df1211c2ec..216ffad76048d94d0efeb5795d8096b50eed4ccc 100644
--- a/remoting/protocol/channel_dispatcher_base.h
+++ b/remoting/protocol/channel_dispatcher_base.h
@@ -57,7 +57,7 @@ class ChannelDispatcherBase : public MessagePipe::EventHandler {
const std::string& channel_name() { return channel_name_; }
// Returns true if the channel is currently connected.
- bool is_connected() { return message_pipe() != nullptr; }
+ bool is_connected() { return is_connected_; }
protected:
explicit ChannelDispatcherBase(const char* channel_name);
@@ -71,12 +71,14 @@ class ChannelDispatcherBase : public MessagePipe::EventHandler {
void OnChannelReady(std::unique_ptr<MessagePipe> message_pipe);
// MessagePipe::EventHandler interface.
+ void OnMessagePipeOpen() override;
void OnMessageReceived(std::unique_ptr<CompoundBuffer> message) override;
void OnMessagePipeClosed() override;
std::string channel_name_;
MessageChannelFactory* channel_factory_ = nullptr;
EventHandler* event_handler_ = nullptr;
+ bool is_connected_ = false;
std::unique_ptr<MessagePipe> message_pipe_;
« no previous file with comments | « no previous file | remoting/protocol/channel_dispatcher_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698