| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/protocol/jingle_session.h" | 5 #include "remoting/protocol/jingle_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "remoting/base/constants.h" | 14 #include "remoting/base/constants.h" |
| 15 #include "remoting/protocol/authenticator.h" | 15 #include "remoting/protocol/authenticator.h" |
| 16 #include "remoting/protocol/channel_authenticator.h" | 16 #include "remoting/protocol/channel_authenticator.h" |
| 17 #include "remoting/protocol/channel_multiplexer.h" | 17 #include "remoting/protocol/channel_multiplexer.h" |
| 18 #include "remoting/protocol/content_description.h" | 18 #include "remoting/protocol/content_description.h" |
| 19 #include "remoting/protocol/jingle_messages.h" | 19 #include "remoting/protocol/jingle_messages.h" |
| 20 #include "remoting/protocol/jingle_session_manager.h" | 20 #include "remoting/protocol/jingle_session_manager.h" |
| 21 #include "remoting/protocol/session_config.h" | 21 #include "remoting/protocol/session_config.h" |
| 22 #include "remoting/signaling/iq_sender.h" | 22 #include "remoting/signaling/iq_sender.h" |
| 23 #include "third_party/libjingle/source/talk/p2p/base/candidate.h" | 23 #include "third_party/libjingle/source/talk/p2p/base/candidate.h" |
| 24 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" | 24 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
| 25 | 25 |
| 26 using buzz::XmlElement; | 26 using buzz::XmlElement; |
| 27 | 27 |
| 28 namespace remoting { | 28 namespace remoting { |
| 29 namespace protocol { | 29 namespace protocol { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 // Delay after candidate creation before sending transport-info | 32 // Delay after candidate creation before sending transport-info |
| 33 // message. This is neccessary to be able to pack multiple candidates | 33 // message. This is neccessary to be able to pack multiple candidates |
| 34 // into one transport-info messages. The value needs to be greater | 34 // into one transport-info messages. The value needs to be greater |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 } | 675 } |
| 676 } | 676 } |
| 677 | 677 |
| 678 bool JingleSession::is_session_active() { | 678 bool JingleSession::is_session_active() { |
| 679 return state_ == CONNECTING || state_ == ACCEPTING || state_ == CONNECTED || | 679 return state_ == CONNECTING || state_ == ACCEPTING || state_ == CONNECTED || |
| 680 state_ == AUTHENTICATING || state_ == AUTHENTICATED; | 680 state_ == AUTHENTICATING || state_ == AUTHENTICATED; |
| 681 } | 681 } |
| 682 | 682 |
| 683 } // namespace protocol | 683 } // namespace protocol |
| 684 } // namespace remoting | 684 } // namespace remoting |
| OLD | NEW |