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

Unified Diff: remoting/protocol/protobuf_video_reader.cc

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 | « remoting/protocol/protobuf_video_reader.h ('k') | remoting/protocol/protobuf_video_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/protobuf_video_reader.cc
diff --git a/remoting/protocol/protobuf_video_reader.cc b/remoting/protocol/protobuf_video_reader.cc
index 827a63f49262bd74ea55e66f200f0d38dbfd0fb2..178a5de0b9b8fc0338757b39d8af7de74b1beaeb 100644
--- a/remoting/protocol/protobuf_video_reader.cc
+++ b/remoting/protocol/protobuf_video_reader.cc
@@ -8,30 +8,31 @@
#include "net/socket/stream_socket.h"
#include "remoting/base/constants.h"
#include "remoting/proto/video.pb.h"
+#include "remoting/protocol/channel_factory.h"
#include "remoting/protocol/session.h"
namespace remoting {
namespace protocol {
ProtobufVideoReader::ProtobufVideoReader(VideoPacketFormat::Encoding encoding)
- : session_(NULL),
- encoding_(encoding),
+ : encoding_(encoding),
+ channel_factory_(NULL),
video_stub_(NULL) {
}
ProtobufVideoReader::~ProtobufVideoReader() {
- if (session_)
- session_->CancelChannelCreation(kVideoChannelName);
+ if (channel_factory_)
+ channel_factory_->CancelChannelCreation(kVideoChannelName);
}
void ProtobufVideoReader::Init(protocol::Session* session,
VideoStub* video_stub,
const InitializedCallback& callback) {
- session_ = session;
+ channel_factory_ = session->GetTransportChannelFactory();
initialized_callback_ = callback;
video_stub_ = video_stub;
- session_->CreateStreamChannel(
+ channel_factory_->CreateStreamChannel(
kVideoChannelName,
base::Bind(&ProtobufVideoReader::OnChannelReady, base::Unretained(this)));
}
« no previous file with comments | « remoting/protocol/protobuf_video_reader.h ('k') | remoting/protocol/protobuf_video_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698