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

Unified Diff: remoting/signaling/xmpp_signal_strategy.h

Issue 958703003: Remove dependency on XMPP implementation in WebRTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: remoting/signaling/xmpp_signal_strategy.h
diff --git a/remoting/signaling/xmpp_signal_strategy.h b/remoting/signaling/xmpp_signal_strategy.h
index 18ae84141b41c1be73f07d3a0ce915eaa604bef8..2c27207bbab41d0b9a87ab14d0aa8b7f049d5871 100644
--- a/remoting/signaling/xmpp_signal_strategy.h
+++ b/remoting/signaling/xmpp_signal_strategy.h
@@ -2,42 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// The XmppSignalStrategy encapsulates all the logic to perform the signaling
-// STUN/ICE for jingle via a direct XMPP connection.
-//
-// This class is not threadsafe.
-
#ifndef REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_
#define REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_
#include "remoting/signaling/signal_strategy.h"
-#include <vector>
-
#include "base/compiler_specific.h"
-#include "base/observer_list.h"
-#include "base/threading/non_thread_safe.h"
-#include "base/timer/timer.h"
-#include "third_party/webrtc/base/sigslot.h"
-#include "third_party/webrtc/libjingle/xmpp/xmppclient.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
namespace net {
class ClientSocketFactory;
class URLRequestContextGetter;
} // namespace net
-namespace rtc {
-class TaskRunner;
-} // namespace rtc
-
namespace remoting {
-class JingleThread;
-
-class XmppSignalStrategy : public base::NonThreadSafe,
- public SignalStrategy,
- public buzz::XmppStanzaHandler,
- public sigslot::has_slots<> {
+// XmppSignalStrategy implements SignalStrategy using direct XMPP connection.
+class XmppSignalStrategy : public SignalStrategy {
public:
// XMPP Server configuration for XmppSignalStrategy.
struct XmppServerConfig {
@@ -70,9 +52,6 @@ class XmppSignalStrategy : public base::NonThreadSafe,
bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override;
std::string GetNextId() override;
- // buzz::XmppStanzaHandler interface.
- bool HandleStanza(const buzz::XmlElement* stanza) override;
-
// This method is used to update the auth info (for example when the OAuth
// access token is renewed). It is OK to call this even when we are in the
// CONNECTED state. It will be used on the next Connect() call.
@@ -80,32 +59,10 @@ class XmppSignalStrategy : public base::NonThreadSafe,
const std::string& auth_token,
const std::string& auth_service);
- // Use this method to override the default resource name used (optional).
- // This will be used on the next Connect() call.
- void SetResourceName(const std::string& resource_name);
-
private:
- static buzz::PreXmppAuth* CreatePreXmppAuth(
- const buzz::XmppClientSettings& settings);
-
- void OnConnectionStateChanged(buzz::XmppEngine::State state);
- void SetState(State new_state);
-
- void SendKeepAlive();
-
- net::ClientSocketFactory* socket_factory_;
- scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
- std::string resource_name_;
- scoped_ptr<rtc::TaskRunner> task_runner_;
- buzz::XmppClient* xmpp_client_;
- XmppServerConfig xmpp_server_config_;
-
- State state_;
- Error error_;
-
- ObserverList<Listener, true> listeners_;
+ class Core;
- base::RepeatingTimer<XmppSignalStrategy> keep_alive_timer_;
+ scoped_ptr<Core> core_;
DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy);
};

Powered by Google App Engine
This is Rietveld 408576698