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

Unified Diff: remoting/protocol/session.h

Issue 10830046: Implement ChannelMultiplexer. (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_tester.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session.h
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
index 91483187d341faa7cabbb1c5056c4f6ede429fb1..7041486be037313ab8a98875647bdfd9d009b30d 100644
--- a/remoting/protocol/session.h
+++ b/remoting/protocol/session.h
@@ -7,16 +7,12 @@
#include <string>
-#include "base/callback.h"
-#include "base/threading/non_thread_safe.h"
-#include "remoting/protocol/buffered_socket_writer.h"
+#include "remoting/protocol/channel_factory.h"
#include "remoting/protocol/errors.h"
#include "remoting/protocol/session_config.h"
namespace net {
class IPEndPoint;
-class Socket;
-class StreamSocket;
} // namespace net
namespace remoting {
@@ -27,7 +23,7 @@ struct TransportRoute;
// Generic interface for Chromotocol connection used by both client and host.
// Provides access to the connection channels, but doesn't depend on the
// protocol used for each channel.
-class Session : public base::NonThreadSafe {
+class Session : public ChannelFactory {
public:
enum State {
// Created, but not connecting yet.
@@ -74,12 +70,6 @@ class Session : public base::NonThreadSafe {
bool ready) {}
};
- // TODO(sergeyu): Specify connection error code when channel
- // connection fails.
- typedef base::Callback<void(scoped_ptr<net::StreamSocket>)>
- StreamChannelCallback;
- typedef base::Callback<void(scoped_ptr<net::Socket>)>
- DatagramChannelCallback;
Session() {}
virtual ~Session() {}
@@ -91,23 +81,6 @@ class Session : public base::NonThreadSafe {
// Returns error code for a failed session.
virtual ErrorCode error() = 0;
- // Creates new channels for this connection. The specified callback
- // is called when then new channel is created and connected. The
- // callback is called with NULL if connection failed for any reason.
- // All channels must be destroyed before the session is
- // destroyed. Can be called only when in CONNECTING, CONNECTED or
- // AUTHENTICATED states.
- virtual void CreateStreamChannel(
- const std::string& name, const StreamChannelCallback& callback) = 0;
- virtual void CreateDatagramChannel(
- const std::string& name, const DatagramChannelCallback& callback) = 0;
-
- // Cancels a pending CreateStreamChannel() or CreateDatagramChannel()
- // operation for the named channel. If the channel creation already
- // completed then cancelling it has no effect. When shutting down
- // this method must be called for each channel pending creation.
- virtual void CancelChannelCreation(const std::string& name) = 0;
-
// JID of the other side.
virtual const std::string& jid() = 0;
« no previous file with comments | « remoting/protocol/connection_tester.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698