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

Unified Diff: remoting/protocol/pepper_session.h

Issue 9325036: Add abstract interfaces for the transport layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
Index: remoting/protocol/pepper_session.h
diff --git a/remoting/protocol/pepper_session.h b/remoting/protocol/pepper_session.h
index 391e8080abc707c170096b6a8e2e664cd0420f53..af534744df5dc62224740f5cb9955307d721d947 100644
--- a/remoting/protocol/pepper_session.h
+++ b/remoting/protocol/pepper_session.h
@@ -16,6 +16,7 @@
#include "remoting/protocol/jingle_messages.h"
#include "remoting/protocol/session.h"
#include "remoting/protocol/session_config.h"
+#include "remoting/protocol/transport.h"
namespace net {
class Socket;
@@ -29,13 +30,13 @@ class IqRequest;
namespace protocol {
class Authenticator;
-class PepperChannel;
class PepperSessionManager;
// Implements the protocol::Session interface using the Pepper P2P
// Transport API. Created by PepperSessionManager for incoming and
// outgoing connections.
-class PepperSession : public Session {
+class PepperSession : public Session,
+ public Transport::EventHandler {
public:
virtual ~PepperSession();
@@ -58,11 +59,16 @@ class PepperSession : public Session {
virtual void set_config(const SessionConfig& config) OVERRIDE;
virtual void Close() OVERRIDE;
+ // Transport::EventHandler interface.
+ virtual void OnChannelCandidate(Transport* channel,
+ const cricket::Candidate& candidate) OVERRIDE;
+ virtual void OnChannelDeleted(Transport* channel) OVERRIDE;
+
private:
friend class PepperSessionManager;
friend class PepperStreamChannel;
- typedef std::map<std::string, PepperChannel*> ChannelsMap;
+ typedef std::map<std::string, Transport*> ChannelsMap;
explicit PepperSession(PepperSessionManager* session_manager);
@@ -95,10 +101,6 @@ class PepperSession : public Session {
void ProcessAuthenticationStep();
void OnSessionInfoResponse(const buzz::XmlElement* response);
- // Called by PepperChannel.
- void AddLocalCandidate(const cricket::Candidate& candidate);
- void OnDeleteChannel(PepperChannel* channel);
-
void SendTransportInfo();
void OnTransportInfoResponse(const buzz::XmlElement* response);

Powered by Google App Engine
This is Rietveld 408576698