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

Unified Diff: remoting/protocol/audio_reader.h

Issue 10823323: Add support for multiplexed channels in remoting::protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ~ Created 8 years, 4 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/audio_reader.cc » ('j') | remoting/protocol/audio_writer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/audio_reader.h
diff --git a/remoting/protocol/audio_reader.h b/remoting/protocol/audio_reader.h
index 2d708db939f1f89b4abcb4ea389629a6cd95f1f4..b17977c7a3e9ad2836157a9e13258af7279bdb37 100644
--- a/remoting/protocol/audio_reader.h
+++ b/remoting/protocol/audio_reader.h
@@ -10,6 +10,7 @@
#include "remoting/proto/audio.pb.h"
#include "remoting/protocol/audio_stub.h"
#include "remoting/protocol/message_reader.h"
+#include "remoting/protocol/channel_dispatcher_base.h"
namespace net {
class StreamSocket;
@@ -21,7 +22,7 @@ namespace protocol {
class Session;
class SessionConfig;
-class AudioReader {
+class AudioReader : public ChannelDispatcherBase {
public:
// The callback is called when initialization is finished. The
// parameter is set to true on success.
@@ -29,30 +30,21 @@ class AudioReader {
virtual ~AudioReader();
+ void set_audio_stub(AudioStub* audio_stub) { audio_stub_ = audio_stub; }
+
static scoped_ptr<AudioReader> Create(const SessionConfig& config);
Wez 2012/08/18 00:30:36 nit: While you're improving this API, shouldn't Cr
Sergey Ulanov 2012/08/18 01:53:56 Strictly speaking the style guide says that constr
Wez 2012/08/18 21:44:06 Yes, I think that makes sense.
- // Initializies the reader.
- void Init(Session* session,
- AudioStub* audio_stub,
- const InitializedCallback& callback);
- bool is_connected();
+ protected:
+ virtual void OnInitialized() OVERRIDE;
private:
explicit AudioReader(AudioPacket::Encoding encoding);
- void OnChannelReady(scoped_ptr<net::StreamSocket> socket);
void OnNewData(scoped_ptr<AudioPacket> packet,
const base::Closure& done_task);
- Session* session_;
-
- InitializedCallback initialized_callback_;
-
AudioPacket::Encoding encoding_;
- // TODO(sergeyu): Remove |channel_| and let |reader_| own it.
- scoped_ptr<net::StreamSocket> channel_;
-
ProtobufMessageReader<AudioPacket> reader_;
// The stub that processes all received packets.
« no previous file with comments | « no previous file | remoting/protocol/audio_reader.cc » ('j') | remoting/protocol/audio_writer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698