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

Unified Diff: remoting/protocol/jingle_session.cc

Issue 7508044: Remove video_channel() from Session interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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/jingle_session.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index 0fa7ccb2ed8eb121dfd201d935a4447ba428aa5e..8c8f14f6c5b71ff57a65b2f33d8c4ccc45014643 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -33,7 +33,6 @@ namespace {
const char kControlChannelName[] = "control";
const char kEventChannelName[] = "event";
-const char kVideoChannelName[] = "video";
const int kMasterKeyLength = 16;
const int kChannelKeyLength = 16;
@@ -160,7 +159,6 @@ void JingleSession::CloseInternal(int result, bool failed) {
control_channel_socket_.reset();
event_channel_socket_.reset();
- video_channel_socket_.reset();
STLDeleteContainerPairSecondPointers(channel_connectors_.begin(),
channel_connectors_.end());
@@ -224,23 +222,6 @@ net::Socket* JingleSession::event_channel() {
return event_channel_socket_.get();
}
-net::Socket* JingleSession::video_channel() {
- DCHECK(CalledOnValidThread());
- return video_channel_socket_.get();
-}
-
-net::Socket* JingleSession::video_rtp_channel() {
- DCHECK(CalledOnValidThread());
- NOTREACHED();
- return NULL;
-}
-
-net::Socket* JingleSession::video_rtcp_channel() {
- DCHECK(CalledOnValidThread());
- NOTREACHED();
- return NULL;
-}
-
const std::string& JingleSession::jid() {
// TODO(sergeyu): Fix ChromotingHost so that it doesn't call this
// method on invalid thread and uncomment this DCHECK.
@@ -453,6 +434,8 @@ void JingleSession::OnAccept() {
}
CreateChannels();
+
+ SetState(CONNECTED);
}
void JingleSession::OnTerminate() {
@@ -461,6 +444,8 @@ void JingleSession::OnTerminate() {
}
void JingleSession::AcceptConnection() {
+ SetState(CONNECTING);
+
if (!jingle_session_manager_->AcceptConnection(this, cricket_session_)) {
Close();
// Release session so that JingleSessionManager::SessionDestroyed()
@@ -469,9 +454,6 @@ void JingleSession::AcceptConnection() {
delete this;
return;
}
-
- // Set state to CONNECTING if the session is being accepted.
- SetState(CONNECTING);
}
void JingleSession::AddChannelConnector(
@@ -512,7 +494,6 @@ void JingleSession::CreateChannels() {
base::Unretained(this)));
CreateStreamChannel(kControlChannelName, stream_callback);
CreateStreamChannel(kEventChannelName, stream_callback);
- CreateStreamChannel(kVideoChannelName, stream_callback);
}
void JingleSession::OnStreamChannelConnected(const std::string& name,
@@ -533,18 +514,12 @@ void JingleSession::OnChannelConnected(const std::string& name,
control_channel_socket_.reset(socket);
} else if (name == kEventChannelName) {
event_channel_socket_.reset(socket);
- } else if (name == kVideoChannelName) {
- video_channel_socket_.reset(socket);
} else {
NOTREACHED();
}
- if (control_channel_socket_.get() && event_channel_socket_.get() &&
- video_channel_socket_.get()) {
- // TODO(sergeyu): State should be set to CONNECTED in OnAccept
- // independent of the channels state.
- SetState(CONNECTED);
- }
+ if (control_channel_socket_.get() && event_channel_socket_.get())
+ SetState(CONNECTED_CHANNELS);
}
const cricket::ContentInfo* JingleSession::GetContentInfo() const {
« no previous file with comments | « remoting/protocol/jingle_session.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698