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

Unified Diff: remoting/jingle_glue/fake_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
Index: remoting/jingle_glue/fake_signal_strategy.h
diff --git a/remoting/jingle_glue/fake_signal_strategy.h b/remoting/jingle_glue/fake_signal_strategy.h
index e14931fc2fc554609a7deec96b17d36ef36172a8..db9cd0aab26e37bcd205564e81e21ffc0aa9746f 100644
--- a/remoting/jingle_glue/fake_signal_strategy.h
+++ b/remoting/jingle_glue/fake_signal_strategy.h
@@ -8,6 +8,7 @@
#include <queue>
#include <string>
+#include "base/observer_list.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "remoting/jingle_glue/iq_sender.h"
@@ -24,8 +25,10 @@ class FakeSignalStrategy : public SignalStrategy,
virtual ~FakeSignalStrategy();
// 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;
@@ -39,7 +42,7 @@ class FakeSignalStrategy : public SignalStrategy,
std::string jid_;
FakeSignalStrategy* peer_;
- std::vector<Listener*> listeners_;
+ ObserverList<Listener, true> listeners_;
int last_id_;
« no previous file with comments | « remoting/host/register_support_host_request_unittest.cc ('k') | remoting/jingle_glue/fake_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698