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

Unified Diff: remoting/protocol/fake_session.h

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/connection_to_host.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.h
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 848a2bf5e3c122c63ed43374c56e9e631869cc3f..5683241d5b4e581f91ecfc052d0ec30eca4ad2da 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -14,6 +14,7 @@
#include "net/base/completion_callback.h"
#include "net/socket/socket.h"
#include "net/socket/stream_socket.h"
+#include "remoting/protocol/channel_factory.h"
#include "remoting/protocol/session.h"
class MessageLoop;
@@ -146,7 +147,8 @@ class FakeUdpSocket : public net::Socket {
// FakeSession is a dummy protocol::Session that uses FakeSocket for all
// channels.
-class FakeSession : public Session {
+class FakeSession : public Session,
+ public ChannelFactory {
public:
FakeSession();
virtual ~FakeSession();
@@ -164,11 +166,18 @@ class FakeSession : public Session {
FakeSocket* GetStreamChannel(const std::string& name);
FakeUdpSocket* GetDatagramChannel(const std::string& name);
- // Session implementation.
+ // Session interface.
virtual void SetEventHandler(EventHandler* event_handler) OVERRIDE;
-
virtual ErrorCode error() OVERRIDE;
+ virtual const std::string& jid() OVERRIDE;
+ virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
+ virtual const SessionConfig& config() OVERRIDE;
+ virtual void set_config(const SessionConfig& config) OVERRIDE;
+ virtual ChannelFactory* GetTransportChannelFactory() OVERRIDE;
+ virtual ChannelFactory* GetMultiplexedChannelFactory() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ // ChannelFactory interface.
virtual void CreateStreamChannel(
const std::string& name, const StreamChannelCallback& callback) OVERRIDE;
virtual void CreateDatagramChannel(
@@ -176,14 +185,6 @@ class FakeSession : public Session {
const DatagramChannelCallback& callback) OVERRIDE;
virtual void CancelChannelCreation(const std::string& name) OVERRIDE;
- virtual const std::string& jid() OVERRIDE;
-
- virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
- virtual const SessionConfig& config() OVERRIDE;
- virtual void set_config(const SessionConfig& config) OVERRIDE;
-
- virtual void Close() OVERRIDE;
-
public:
EventHandler* event_handler_;
scoped_ptr<const CandidateSessionConfig> candidate_config_;
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698