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

Unified Diff: remoting/protocol/transport.h

Issue 1412313006: Remove remoting::protocol::Transport interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@transport_session.h
Patch Set: Created 5 years, 2 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/libjingle_transport_factory.cc ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/transport.h
diff --git a/remoting/protocol/transport.h b/remoting/protocol/transport.h
index c63bb4e23b7c44ecc1e03354df5be03b41982183..77b328ec29c7473768ff7fe5a080918f57008cc5 100644
--- a/remoting/protocol/transport.h
+++ b/remoting/protocol/transport.h
@@ -53,70 +53,6 @@ struct TransportRoute {
net::IPEndPoint local_address;
};
-// Transport objects are responsible for establishing P2P connections.
-//
-// TODO(sergeyu): Remove this interface and rename TransportSession interface to
-// Transport.
-class Transport : public base::NonThreadSafe {
- public:
- class EventHandler {
- public:
- EventHandler() {};
- virtual ~EventHandler() {};
-
- // Called to pass ICE credentials to the session. Used only for STANDARD
- // version of ICE, see SetIceVersion().
- virtual void OnTransportIceCredentials(Transport* transport,
- const std::string& ufrag,
- const std::string& password) = 0;
-
- // Called when the transport generates a new candidate that needs
- // to be passed to the AddRemoteCandidate() method on the remote
- // end of the connection.
- virtual void OnTransportCandidate(Transport* transport,
- const cricket::Candidate& candidate) = 0;
-
- // Called when transport route changes. Can be called even before
- // the transport is connected.
- virtual void OnTransportRouteChange(Transport* transport,
- const TransportRoute& route) = 0;
-
- // Called when when the transport has failed to connect or reconnect.
- virtual void OnTransportFailed(Transport* transport) = 0;
-
- // Called when the transport is about to be deleted.
- virtual void OnTransportDeleted(Transport* transport) = 0;
- };
-
- typedef base::Callback<void(scoped_ptr<P2PDatagramSocket>)> ConnectedCallback;
-
- Transport() {}
- virtual ~Transport() {}
-
- // Connects the transport and calls the |callback| after that.
- virtual void Connect(const std::string& name,
- Transport::EventHandler* event_handler,
- const ConnectedCallback& callback) = 0;
-
- // Sets remote ICE credentials.
- virtual void SetRemoteCredentials(const std::string& ufrag,
- const std::string& password) = 0;
-
- // Adds |candidate| received from the peer.
- virtual void AddRemoteCandidate(const cricket::Candidate& candidate) = 0;
-
- // Name of the channel. It is used to identify the channel and
- // disambiguate candidates it generates from candidates generated by
- // parallel connections.
- virtual const std::string& name() const = 0;
-
- // Returns true if the channel is already connected.
- virtual bool is_connected() const = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Transport);
-};
-
// TransportSession represents a P2P connection that consists of one or more
// channels.
class TransportSession {
@@ -165,12 +101,6 @@ class TransportFactory {
TransportFactory() { }
virtual ~TransportFactory() { }
- // Called to notify transport factory that a new transport might be created
- // soon, e.g. when a new session is being created. Implementation may use it
- // to start asynchronous preparation, e.g. fetch a new relay token if
- // necessary while the session is being authenticated.
- virtual void PrepareTokens() = 0;
-
// Creates a new TransportSession. The factory must outlive the session.
virtual scoped_ptr<TransportSession> CreateTransportSession() = 0;
« no previous file with comments | « remoting/protocol/libjingle_transport_factory.cc ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698