Chromium Code Reviews| Index: remoting/protocol/audio_writer.h |
| diff --git a/remoting/protocol/audio_writer.h b/remoting/protocol/audio_writer.h |
| index 34bd8f9ac993986079e5372e751e1f10d188fa78..181e7990b6e06155104e1d143d5ac011394b4eec 100644 |
| --- a/remoting/protocol/audio_writer.h |
| +++ b/remoting/protocol/audio_writer.h |
| @@ -13,6 +13,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "remoting/protocol/audio_stub.h" |
| #include "remoting/protocol/buffered_socket_writer.h" |
| +#include "remoting/protocol/channel_dispatcher_base.h" |
| namespace net { |
| class StreamSocket; |
| @@ -24,7 +25,8 @@ namespace protocol { |
| class Session; |
| class SessionConfig; |
| -class AudioWriter : public AudioStub { |
| +class AudioWriter : public ChannelDispatcherBase, |
| + public AudioStub { |
| public: |
| virtual ~AudioWriter(); |
| @@ -34,32 +36,16 @@ class AudioWriter : public AudioStub { |
| static scoped_ptr<AudioWriter> Create(const SessionConfig& config); |
|
Wez
2012/08/18 00:30:36
nit: Comment to clarify how to configure the Audio
Sergey Ulanov
2012/08/18 01:53:56
Done.
|
| - // Initializes the writer. |
| - void Init(Session* session, const InitializedCallback& callback); |
| - |
| - // Stops writing. Must be called on the network thread before this |
| - // object is destroyed. |
| - void Close(); |
| - |
| - // Returns true if the channel is connected. |
| - bool is_connected(); |
| - |
| // AudioStub interface. |
| virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, |
| const base::Closure& done) OVERRIDE; |
| + protected: |
| + virtual void OnInitialized() OVERRIDE; |
| + |
| private: |
| AudioWriter(); |
| - void OnChannelReady(scoped_ptr<net::StreamSocket> socket); |
| - |
| - Session* session_; |
| - |
| - InitializedCallback initialized_callback_; |
| - |
| - // TODO(sergeyu): Remove |channel_| and let |buffered_writer_| own it. |
| - scoped_ptr<net::StreamSocket> channel_; |
| - |
| BufferedSocketWriter buffered_writer_; |
| DISALLOW_COPY_AND_ASSIGN(AudioWriter); |