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

Unified Diff: remoting/protocol/protobuf_video_writer.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_writer.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/protobuf_video_writer.cc
diff --git a/remoting/protocol/protobuf_video_writer.cc b/remoting/protocol/protobuf_video_writer.cc
index 12dd6611ad50a3d359163967aba8be8947dedb87..e1318c0695f7b0e4e7d46d29a3ae689d9c5b9af1 100644
--- a/remoting/protocol/protobuf_video_writer.cc
+++ b/remoting/protocol/protobuf_video_writer.cc
@@ -8,6 +8,7 @@
#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"
#include "remoting/protocol/util.h"
@@ -15,7 +16,7 @@ namespace remoting {
namespace protocol {
ProtobufVideoWriter::ProtobufVideoWriter()
- : session_(NULL) {
+ : channel_factory_(NULL) {
}
ProtobufVideoWriter::~ProtobufVideoWriter() {
@@ -24,10 +25,10 @@ ProtobufVideoWriter::~ProtobufVideoWriter() {
void ProtobufVideoWriter::Init(protocol::Session* session,
const InitializedCallback& callback) {
- session_ = session;
+ channel_factory_ = session->GetTransportChannelFactory();
initialized_callback_ = callback;
- session_->CreateStreamChannel(
+ channel_factory_->CreateStreamChannel(
kVideoChannelName,
base::Bind(&ProtobufVideoWriter::OnChannelReady, base::Unretained(this)));
}
@@ -50,9 +51,9 @@ void ProtobufVideoWriter::OnChannelReady(scoped_ptr<net::StreamSocket> socket) {
void ProtobufVideoWriter::Close() {
buffered_writer_.Close();
channel_.reset();
- if (session_) {
- session_->CancelChannelCreation(kVideoChannelName);
- session_ = NULL;
+ if (channel_factory_) {
+ channel_factory_->CancelChannelCreation(kVideoChannelName);
+ channel_factory_ = NULL;
}
}
« no previous file with comments | « remoting/protocol/protobuf_video_writer.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698