diff options
author | sergeyu <sergeyu@chromium.org> | 2015-01-10 13:44:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-10 21:44:59 +0000 |
commit | 203832d43af2d2c0cb92ca2a6ad3e59193c6836d (patch) | |
tree | 44cb36fdca1dcb557781260a676cf374ad0ff94b /remoting/protocol/connection_to_client.h | |
parent | f4f051fe183f2595bb09d6ddcc9da895460c4429 (diff) | |
download | chromium_src-203832d43af2d2c0cb92ca2a6ad3e59193c6836d.zip chromium_src-203832d43af2d2c0cb92ca2a6ad3e59193c6836d.tar.gz chromium_src-203832d43af2d2c0cb92ca2a6ad3e59193c6836d.tar.bz2 |
Cleanup channel dispatchers
Now ChannelDispatcherBase handles initialization of reader and writer,
which makes all dispatcher classes simpler. ChannelDispatcherBase now
can handle writer errors. Also renamed
ProtobufMessageReader -> ProtobufMessageParser.
Review URL: https://codereview.chromium.org/841773005
Cr-Commit-Position: refs/heads/master@{#310993}
Diffstat (limited to 'remoting/protocol/connection_to_client.h')
-rw-r--r-- | remoting/protocol/connection_to_client.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h index 8f075b7..11f4a34 100644 --- a/remoting/protocol/connection_to_client.h +++ b/remoting/protocol/connection_to_client.h @@ -31,7 +31,8 @@ class VideoStub; // host. It sets up all protocol channels and connects them to the // stubs. class ConnectionToClient : public base::NonThreadSafe, - public Session::EventHandler { + public Session::EventHandler, + public ChannelDispatcherBase::EventHandler { public: class EventHandler { public: @@ -105,10 +106,12 @@ class ConnectionToClient : public base::NonThreadSafe, void OnSessionRouteChange(const std::string& channel_name, const TransportRoute& route) override; - private: - // Callback for channel initialization. - void OnChannelInitialized(bool successful); + // ChannelDispatcherBase::EventHandler interface. + void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override; + void OnChannelError(ChannelDispatcherBase* channel_dispatcher, + ErrorCode error) override; + private: void NotifyIfChannelsReady(); void Close(ErrorCode error); |