diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 16:35:44 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 16:35:44 +0000 |
commit | 512ac40edc7551c76bbd9bf288afee209f6bba15 (patch) | |
tree | 1ff85ae2cf2b7d65fef41729225a62b9ecc1d1f1 /remoting/jingle_glue/javascript_signal_strategy.h | |
parent | 590742dc369f718055cded657f197d154639493e (diff) | |
download | chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.zip chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.tar.gz chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.tar.bz2 |
Refactoring around SignalStrategy interface.
- Added AddListener/RemoveListener in the SignalStrategy interface.
- Remove dependancy on JavascriptIqRequest from JingleSignalingConnector.
BUG=None
TEST=Chromoting client still works
Review URL: http://codereview.chromium.org/7239005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/javascript_signal_strategy.h')
-rw-r--r-- | remoting/jingle_glue/javascript_signal_strategy.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/remoting/jingle_glue/javascript_signal_strategy.h b/remoting/jingle_glue/javascript_signal_strategy.h index 033ba0e..3cebf05 100644 --- a/remoting/jingle_glue/javascript_signal_strategy.h +++ b/remoting/jingle_glue/javascript_signal_strategy.h @@ -10,14 +10,18 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "base/threading/non_thread_safe.h" #include "remoting/jingle_glue/javascript_iq_request.h" +#include "remoting/jingle_glue/xmpp_proxy.h" namespace remoting { class JingleSignalingConnector; class XmppProxy; -class JavascriptSignalStrategy : public SignalStrategy { +class JavascriptSignalStrategy : public SignalStrategy, + public XmppProxy::ResponseCallback, + public base::NonThreadSafe { public: explicit JavascriptSignalStrategy(const std::string& your_jid); virtual ~JavascriptSignalStrategy(); @@ -26,9 +30,14 @@ class JavascriptSignalStrategy : public SignalStrategy { // SignalStrategy interface. virtual void Init(StatusObserver* observer) OVERRIDE; + virtual void SetListener(Listener* listener) OVERRIDE; + virtual void SendStanza(buzz::XmlElement* stanza) OVERRIDE; virtual void StartSession(cricket::SessionManager* session_manager) OVERRIDE; virtual void EndSession() OVERRIDE; - virtual JavascriptIqRequest* CreateIqRequest() OVERRIDE; + virtual IqRequest* CreateIqRequest() OVERRIDE; + + // XmppProxy::ResponseCallback interface. + virtual void OnIq(const std::string& stanza); private: std::string your_jid_; @@ -36,6 +45,8 @@ class JavascriptSignalStrategy : public SignalStrategy { JavascriptIqRegistry iq_registry_; scoped_ptr<JingleSignalingConnector> jingle_signaling_connector_; + Listener* listener_; + DISALLOW_COPY_AND_ASSIGN(JavascriptSignalStrategy); }; |