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

Unified Diff: remoting/protocol/protobuf_video_reader.cc

Issue 8573013: Add CancelChannelCreation() in protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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 cf5d1a989689723180888712dbe5f3f02d5dfa2a..0bcc9fe9b354129c2351177a0a635c12c8e17201 100644
--- a/remoting/protocol/protobuf_video_reader.cc
+++ b/remoting/protocol/protobuf_video_reader.cc
@@ -15,19 +15,24 @@ namespace remoting {
namespace protocol {
ProtobufVideoReader::ProtobufVideoReader(VideoPacketFormat::Encoding encoding)
- : encoding_(encoding),
+ : session_(NULL),
+ encoding_(encoding),
video_stub_(NULL) {
}
-ProtobufVideoReader::~ProtobufVideoReader() { }
+ProtobufVideoReader::~ProtobufVideoReader() {
+ if (session_)
+ session_->CancelChannelCreation(kVideoChannelName);
+}
void ProtobufVideoReader::Init(protocol::Session* session,
VideoStub* video_stub,
const InitializedCallback& callback) {
+ session_ = session;
initialized_callback_ = callback;
video_stub_ = video_stub;
- session->CreateStreamChannel(
+ session_->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