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

Unified Diff: remoting/protocol/fake_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/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.cc
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index b23dbb1dc299b82bb6f31e937e80d99ae5d27b8e..a2496a7a674efd4c58e0a09207348cc2604561c7 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -70,6 +70,67 @@ bool FakeSocket::SetSendBufferSize(int32 size) {
return false;
}
+int FakeSocket::Connect(net::CompletionCallback* callback) {
+ return net::OK;
+}
+
+void FakeSocket::Disconnect() {
+ NOTIMPLEMENTED();
+}
+
+bool FakeSocket::IsConnected() const {
+ return true;
+}
+
+bool FakeSocket::IsConnectedAndIdle() const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+int FakeSocket::GetPeerAddress(
+ net::AddressList* address) const {
+ NOTIMPLEMENTED();
+ return net::ERR_FAILED;
+}
+
+int FakeSocket::GetLocalAddress(
+ net::IPEndPoint* address) const {
+ NOTIMPLEMENTED();
+ return net::ERR_FAILED;
+}
+
+const net::BoundNetLog& FakeSocket::NetLog() const {
+ return net_log_;
+}
+
+void FakeSocket::SetSubresourceSpeculation() {
+ NOTIMPLEMENTED();
+}
+
+void FakeSocket::SetOmniboxSpeculation() {
+ NOTIMPLEMENTED();
+}
+
+bool FakeSocket::WasEverUsed() const {
+ NOTIMPLEMENTED();
+ return true;
+}
+
+bool FakeSocket::UsingTCPFastOpen() const {
+ NOTIMPLEMENTED();
+ return true;
+}
+
+int64 FakeSocket::NumBytesRead() const {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+base::TimeDelta FakeSocket::GetConnectTimeMicros() const {
+ NOTIMPLEMENTED();
+ return base::TimeDelta();
+}
+
FakeUdpSocket::FakeUdpSocket()
: read_pending_(false),
input_pos_(0) {
@@ -135,21 +196,31 @@ FakeSession::FakeSession()
FakeSession::~FakeSession() { }
-void FakeSession::SetStateChangeCallback(
- StateChangeCallback* callback) {
+FakeSocket* FakeSession::GetStreamChannel(const std::string& name) {
+ return stream_channels_[name];
+}
+
+FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) {
+ return datagram_channels_[name];
+}
+
+void FakeSession::SetStateChangeCallback(StateChangeCallback* callback) {
callback_.reset(callback);
}
void FakeSession::CreateStreamChannel(
const std::string& name, const StreamChannelCallback& callback) {
- NOTIMPLEMENTED();
- callback.Run(name, NULL);
+ LOG(ERROR) << " creating channel " << name;
+ FakeSocket* channel = new FakeSocket();
+ stream_channels_[name] = channel;
+ callback.Run(name, channel);
}
void FakeSession::CreateDatagramChannel(
const std::string& name, const DatagramChannelCallback& callback) {
- NOTIMPLEMENTED();
- callback.Run(name, NULL);
+ FakeUdpSocket* channel = new FakeUdpSocket();
+ datagram_channels_[name] = channel;
+ callback.Run(name, channel);
}
FakeSocket* FakeSession::control_channel() {
@@ -160,18 +231,6 @@ FakeSocket* FakeSession::event_channel() {
return &event_channel_;
}
-FakeSocket* FakeSession::video_channel() {
- return &video_channel_;
-}
-
-FakeUdpSocket* FakeSession::video_rtp_channel() {
- return &video_rtp_channel_;
-}
-
-FakeUdpSocket* FakeSession::video_rtcp_channel() {
- return &video_rtcp_channel_;
-}
-
const std::string& FakeSession::jid() {
return jid_;
}
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698