| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/signaling/fake_signal_strategy.h" | 5 #include "remoting/signaling/fake_signal_strategy.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "remoting/signaling/jid_util.h" | 16 #include "remoting/signaling/jid_util.h" |
| 17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 17 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
| 18 #include "third_party/webrtc/libjingle/xmpp/constants.h" | 18 #include "third_party/libjingle_xmpp/xmpp/constants.h" |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 void FakeSignalStrategy::Connect(FakeSignalStrategy* peer1, | 23 void FakeSignalStrategy::Connect(FakeSignalStrategy* peer1, |
| 24 FakeSignalStrategy* peer2) { | 24 FakeSignalStrategy* peer2) { |
| 25 DCHECK(peer1->main_thread_->BelongsToCurrentThread()); | 25 DCHECK(peer1->main_thread_->BelongsToCurrentThread()); |
| 26 DCHECK(peer2->main_thread_->BelongsToCurrentThread()); | 26 DCHECK(peer2->main_thread_->BelongsToCurrentThread()); |
| 27 peer1->ConnectTo(peer2); | 27 peer1->ConnectTo(peer2); |
| 28 peer2->ConnectTo(peer1); | 28 peer2->ConnectTo(peer1); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 if (listener.OnSignalStrategyIncomingStanza(stanza_ptr)) | 176 if (listener.OnSignalStrategyIncomingStanza(stanza_ptr)) |
| 177 break; | 177 break; |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) { | 181 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) { |
| 182 peer_callback_ = peer_callback; | 182 peer_callback_ = peer_callback; |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace remoting | 185 } // namespace remoting |
| OLD | NEW |