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

Unified Diff: remoting/jingle_glue/xmpp_signal_strategy.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, 12 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/jingle_glue/signal_strategy.h ('k') | remoting/jingle_glue/xmpp_signal_strategy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/xmpp_signal_strategy.h
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.h b/remoting/jingle_glue/xmpp_signal_strategy.h
index 81426fe6038707d7ce7bc00dd4596f9efb8e7eac..8695c9099003082a15e5e58f207eb2b4478e2fe8 100644
--- a/remoting/jingle_glue/xmpp_signal_strategy.h
+++ b/remoting/jingle_glue/xmpp_signal_strategy.h
@@ -15,6 +15,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/observer_list.h"
#include "third_party/libjingle/source/talk/base/sigslot.h"
#include "third_party/libjingle/source/talk/xmpp/xmppclient.h"
@@ -33,8 +34,10 @@ class XmppSignalStrategy : public SignalStrategy,
virtual ~XmppSignalStrategy();
// SignalStrategy interface.
- virtual void Init(StatusObserver* observer) OVERRIDE;
- virtual void Close() OVERRIDE;
+ virtual void Connect() OVERRIDE;
+ virtual void Disconnect() OVERRIDE;
+ virtual State GetState() const OVERRIDE;
+ virtual std::string GetLocalJid() const OVERRIDE;
virtual void AddListener(Listener* listener) OVERRIDE;
virtual void RemoveListener(Listener* listener) OVERRIDE;
virtual bool SendStanza(buzz::XmlElement* stanza) OVERRIDE;
@@ -55,9 +58,9 @@ class XmppSignalStrategy : public SignalStrategy,
std::string auth_token_service_;
buzz::XmppClient* xmpp_client_;
- StatusObserver* observer_;
- std::vector<Listener*> listeners_;
+ State state_;
+ ObserverList<Listener> listeners_;
DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy);
};
« no previous file with comments | « remoting/jingle_glue/signal_strategy.h ('k') | remoting/jingle_glue/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698