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

Side by Side Diff: remoting/protocol/libjingle_transport_factory.cc

Issue 1278073004: Roll WebRTC 9687:9692, Libjingle 9690:9692 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove roll part; keep only remoting part Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/chromium_port_allocator.cc ('k') | remoting/test/fake_port_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 void LibjingleTransport::DoStart() { 187 void LibjingleTransport::DoStart() {
188 DCHECK(!channel_.get()); 188 DCHECK(!channel_.get());
189 189
190 // Create P2PTransportChannel, attach signal handlers and connect it. 190 // Create P2PTransportChannel, attach signal handlers and connect it.
191 // TODO(sergeyu): Specify correct component ID for the channel. 191 // TODO(sergeyu): Specify correct component ID for the channel.
192 channel_.reset(new cricket::P2PTransportChannel( 192 channel_.reset(new cricket::P2PTransportChannel(
193 std::string(), 0, nullptr, port_allocator_)); 193 std::string(), 0, nullptr, port_allocator_));
194 std::string ice_password = rtc::CreateRandomString(cricket::ICE_PWD_LENGTH); 194 std::string ice_password = rtc::CreateRandomString(cricket::ICE_PWD_LENGTH);
195 channel_->SetIceProtocolType(cricket::ICEPROTO_RFC5245);
196 channel_->SetIceRole((role_ == TransportRole::CLIENT) 195 channel_->SetIceRole((role_ == TransportRole::CLIENT)
197 ? cricket::ICEROLE_CONTROLLING 196 ? cricket::ICEROLE_CONTROLLING
198 : cricket::ICEROLE_CONTROLLED); 197 : cricket::ICEROLE_CONTROLLED);
199 event_handler_->OnTransportIceCredentials(this, ice_username_fragment_, 198 event_handler_->OnTransportIceCredentials(this, ice_username_fragment_,
200 ice_password); 199 ice_password);
201 channel_->SetIceCredentials(ice_username_fragment_, ice_password); 200 channel_->SetIceCredentials(ice_username_fragment_, ice_password);
202 channel_->SignalRequestSignaling.connect( 201 channel_->SignalRequestSignaling.connect(
203 this, &LibjingleTransport::OnRequestSignaling); 202 this, &LibjingleTransport::OnRequestSignaling);
204 channel_->SignalCandidateReady.connect( 203 channel_->SignalCandidateReady.connect(
205 this, &LibjingleTransport::OnCandidateReady); 204 this, &LibjingleTransport::OnCandidateReady);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 last_jingle_info_update_time_ = base::TimeTicks::Now(); 445 last_jingle_info_update_time_ = base::TimeTicks::Now();
447 446
448 while (!on_jingle_info_callbacks_.empty()) { 447 while (!on_jingle_info_callbacks_.empty()) {
449 on_jingle_info_callbacks_.begin()->Run(); 448 on_jingle_info_callbacks_.begin()->Run();
450 on_jingle_info_callbacks_.pop_front(); 449 on_jingle_info_callbacks_.pop_front();
451 } 450 }
452 } 451 }
453 452
454 } // namespace protocol 453 } // namespace protocol
455 } // namespace remoting 454 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/chromium_port_allocator.cc ('k') | remoting/test/fake_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698