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

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: fix crash Created 8 years, 10 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/pepper_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pepper_session.h
diff --git a/remoting/protocol/pepper_session.h b/remoting/protocol/pepper_session.h
index 391e8080abc707c170096b6a8e2e664cd0420f53..c8c87e76ace70278be241401895b23eb0821377b 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,17 @@ class PepperSession : public Session {
virtual void set_config(const SessionConfig& config) OVERRIDE;
virtual void Close() OVERRIDE;
+ // Transport::EventHandler interface.
+ virtual void OnTransportCandidate(
+ Transport* transport,
+ const cricket::Candidate& candidate) OVERRIDE;
+ virtual void OnTransportDeleted(Transport* transport) 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 +102,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);
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/pepper_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698