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

Side by Side Diff: remoting/jingle_glue/jingle_signaling_connector.h

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_ 5 #ifndef REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_
6 #define REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_ 6 #define REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 // This class is not threadsafe, and should only be used on the thread it is 34 // This class is not threadsafe, and should only be used on the thread it is
35 // created on. 35 // created on.
36 class JingleSignalingConnector : public SignalStrategy::Listener, 36 class JingleSignalingConnector : public SignalStrategy::Listener,
37 public sigslot::has_slots<> { 37 public sigslot::has_slots<> {
38 public: 38 public:
39 JingleSignalingConnector(SignalStrategy* signal_strategy, 39 JingleSignalingConnector(SignalStrategy* signal_strategy,
40 cricket::SessionManager* session_manager); 40 cricket::SessionManager* session_manager);
41 virtual ~JingleSignalingConnector(); 41 virtual ~JingleSignalingConnector();
42 42
43 // SignalStrategy::Listener interface. 43 // SignalStrategy::Listener interface.
44 virtual bool OnIncomingStanza(const buzz::XmlElement* stanza) OVERRIDE; 44 virtual void OnSignalStrategyStateChange(
45 SignalStrategy::State state) OVERRIDE;
46 virtual bool OnSignalStrategyIncomingStanza(
47 const buzz::XmlElement* stanza) OVERRIDE;
45 48
46 private: 49 private:
47 typedef std::map<std::string, buzz::XmlElement*> IqRequestsMap; 50 typedef std::map<std::string, buzz::XmlElement*> IqRequestsMap;
48 51
49 void OnOutgoingMessage(cricket::SessionManager* manager, 52 void OnOutgoingMessage(cricket::SessionManager* manager,
50 const buzz::XmlElement* stanza); 53 const buzz::XmlElement* stanza);
51 54
52 SignalStrategy* signal_strategy_; 55 SignalStrategy* signal_strategy_;
53 cricket::SessionManager* session_manager_; 56 cricket::SessionManager* session_manager_;
54 IqRequestsMap pending_requests_; 57 IqRequestsMap pending_requests_;
55 58
56 DISALLOW_COPY_AND_ASSIGN(JingleSignalingConnector); 59 DISALLOW_COPY_AND_ASSIGN(JingleSignalingConnector);
57 }; 60 };
58 61
59 } // namespace remoting 62 } // namespace remoting
60 63
61 #endif // REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_ 64 #endif // REMOTING_JINGLE_GLUE_JINGLE_SIGNALING_CONNECTOR_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/javascript_signal_strategy.cc ('k') | remoting/jingle_glue/jingle_signaling_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698