| 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/libjingle_transport_factory.h" | 5 #include "remoting/protocol/libjingle_transport_factory.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const NetworkSettings& network_settings); | 41 const NetworkSettings& network_settings); |
| 42 virtual ~LibjingleTransport(); | 42 virtual ~LibjingleTransport(); |
| 43 | 43 |
| 44 // Called by JingleTransportFactory when it has fresh Jingle info. | 44 // Called by JingleTransportFactory when it has fresh Jingle info. |
| 45 void OnCanStart(); | 45 void OnCanStart(); |
| 46 | 46 |
| 47 // Transport interface. | 47 // Transport interface. |
| 48 virtual void Connect( | 48 virtual void Connect( |
| 49 const std::string& name, | 49 const std::string& name, |
| 50 Transport::EventHandler* event_handler, | 50 Transport::EventHandler* event_handler, |
| 51 const Transport::ConnectedCallback& callback) OVERRIDE; | 51 const Transport::ConnectedCallback& callback) override; |
| 52 virtual void AddRemoteCandidate(const cricket::Candidate& candidate) OVERRIDE; | 52 virtual void AddRemoteCandidate(const cricket::Candidate& candidate) override; |
| 53 virtual const std::string& name() const OVERRIDE; | 53 virtual const std::string& name() const override; |
| 54 virtual bool is_connected() const OVERRIDE; | 54 virtual bool is_connected() const override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 void DoStart(); | 57 void DoStart(); |
| 58 void NotifyConnected(); | 58 void NotifyConnected(); |
| 59 | 59 |
| 60 // Signal handlers for cricket::TransportChannel. | 60 // Signal handlers for cricket::TransportChannel. |
| 61 void OnRequestSignaling(cricket::TransportChannelImpl* channel); | 61 void OnRequestSignaling(cricket::TransportChannelImpl* channel); |
| 62 void OnCandidateReady(cricket::TransportChannelImpl* channel, | 62 void OnCandidateReady(cricket::TransportChannelImpl* channel, |
| 63 const cricket::Candidate& candidate); | 63 const cricket::Candidate& candidate); |
| 64 void OnRouteChange(cricket::TransportChannel* channel, | 64 void OnRouteChange(cricket::TransportChannel* channel, |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 last_jingle_info_update_time_ = base::TimeTicks::Now(); | 389 last_jingle_info_update_time_ = base::TimeTicks::Now(); |
| 390 | 390 |
| 391 while (!on_jingle_info_callbacks_.empty()) { | 391 while (!on_jingle_info_callbacks_.empty()) { |
| 392 on_jingle_info_callbacks_.begin()->Run(); | 392 on_jingle_info_callbacks_.begin()->Run(); |
| 393 on_jingle_info_callbacks_.pop_front(); | 393 on_jingle_info_callbacks_.pop_front(); |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace protocol | 397 } // namespace protocol |
| 398 } // namespace remoting | 398 } // namespace remoting |
| OLD | NEW |