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

Unified Diff: remoting/protocol/pepper_stream_channel.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/pepper_stream_channel.h ('k') | remoting/protocol/protobuf_video_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pepper_stream_channel.cc
diff --git a/remoting/protocol/pepper_stream_channel.cc b/remoting/protocol/pepper_stream_channel.cc
index 5f8afab9f7cd125acb73acd1d56cc30dfe2ff0bf..84abe257489743633feb4aee0c823edda4666e0f 100644
--- a/remoting/protocol/pepper_stream_channel.cc
+++ b/remoting/protocol/pepper_stream_channel.cc
@@ -81,6 +81,7 @@ PepperStreamChannel::PepperStreamChannel(
}
PepperStreamChannel::~PepperStreamChannel() {
+ session_->OnDeleteChannel(this);
// Verify that the |channel_| is ether destroyed or we own it.
DCHECK_EQ(channel_, owned_channel_.get());
// Channel should be already destroyed if we were connected.
@@ -163,17 +164,21 @@ void PepperStreamChannel::AddRemoveCandidate(
channel_->AddRemoteCandidate(jingle_glue::SerializeP2PCandidate(candidate));
}
-const std::string& PepperStreamChannel::name() {
+const std::string& PepperStreamChannel::name() const {
DCHECK(CalledOnValidThread());
return name_;
}
+bool PepperStreamChannel::is_connected() const {
+ DCHECK(CalledOnValidThread());
+ return connected_;
+}
+
void PepperStreamChannel::OnChannelDeleted() {
if (connected_) {
channel_ = NULL;
- // The PepperTransportSocketAdapter is being deleted, so delete the
- // channel too.
- session_->OnDeleteChannel(this);
+ // The PepperTransportSocketAdapter is being deleted, so delete
+ // the channel too.
delete this;
}
}
« no previous file with comments | « remoting/protocol/pepper_stream_channel.h ('k') | remoting/protocol/protobuf_video_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698