| Index: remoting/protocol/pepper_session_manager.cc
|
| diff --git a/remoting/protocol/pepper_session_manager.cc b/remoting/protocol/pepper_session_manager.cc
|
| index 7e7fe6985de75aab9e7e68dcf2fe60e0aefe6c07..ea095c36d55b9c96f6571557f271532c1c2fb381 100644
|
| --- a/remoting/protocol/pepper_session_manager.cc
|
| +++ b/remoting/protocol/pepper_session_manager.cc
|
| @@ -5,6 +5,7 @@
|
| #include "remoting/protocol/pepper_session_manager.h"
|
|
|
| #include "base/bind.h"
|
| +#include "remoting/jingle_glue/iq_sender.h"
|
| #include "remoting/jingle_glue/jingle_info_request.h"
|
| #include "remoting/jingle_glue/signal_strategy.h"
|
| #include "remoting/protocol/jingle_messages.h"
|
| @@ -38,18 +39,18 @@ void PepperSessionManager::Init(
|
| listener_ = listener;
|
| local_jid_ = local_jid;
|
| signal_strategy_ = signal_strategy;
|
| + iq_sender_.reset(new IqSender(signal_strategy_));
|
| private_key_.reset(private_key);
|
| certificate_ = certificate;
|
| allow_nat_traversal_ = allow_nat_traversal;
|
|
|
| - signal_strategy_->SetListener(this);
|
| + signal_strategy_->AddListener(this);
|
|
|
| // If NAT traversal is enabled then we need to request STUN/Relay info.
|
| if (allow_nat_traversal) {
|
| - jingle_info_request_.reset(
|
| - new JingleInfoRequest(signal_strategy_->CreateIqRequest()));
|
| - jingle_info_request_->Send(base::Bind(
|
| - &PepperSessionManager::OnJingleInfo, base::Unretained(this)));
|
| + jingle_info_request_.reset(new JingleInfoRequest(signal_strategy_));
|
| + jingle_info_request_->Send(base::Bind(&PepperSessionManager::OnJingleInfo,
|
| + base::Unretained(this)));
|
| } else {
|
| listener_->OnSessionManagerInitialized();
|
| }
|
| @@ -95,7 +96,7 @@ void PepperSessionManager::Close() {
|
| listener_ = NULL;
|
| jingle_info_request_.reset();
|
|
|
| - signal_strategy_->SetListener(NULL);
|
| + signal_strategy_->RemoveListener(this);
|
| }
|
|
|
| bool PepperSessionManager::OnIncomingStanza(const buzz::XmlElement* stanza) {
|
| @@ -128,10 +129,6 @@ bool PepperSessionManager::OnIncomingStanza(const buzz::XmlElement* stanza) {
|
| return true;
|
| }
|
|
|
| -IqRequest* PepperSessionManager::CreateIqRequest() {
|
| - return signal_strategy_->CreateIqRequest();
|
| -}
|
| -
|
| void PepperSessionManager::SendReply(const buzz::XmlElement* original_stanza,
|
| const JingleMessageReply& reply) {
|
| buzz::XmlElement* stanza = reply.ToXml(original_stanza);
|
|
|