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

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

Issue 1946553002: WebRTC's scoped_ptr and scoped_ptr.h are going away, so stop using them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/fake_desktop_capturer.cc ('k') | third_party/libjingle/libjingle_nacl.gyp » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/webrtc_transport.h" 5 #include "remoting/protocol/webrtc_transport.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 rtc_config.servers.push_back(stun_server); 189 rtc_config.servers.push_back(stun_server);
190 190
191 webrtc::FakeConstraints constraints; 191 webrtc::FakeConstraints constraints;
192 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, 192 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
193 webrtc::MediaConstraintsInterface::kValueTrue); 193 webrtc::MediaConstraintsInterface::kValueTrue);
194 194
195 std::unique_ptr<cricket::PortAllocator> port_allocator = 195 std::unique_ptr<cricket::PortAllocator> port_allocator =
196 transport_context_->port_allocator_factory()->CreatePortAllocator( 196 transport_context_->port_allocator_factory()->CreatePortAllocator(
197 transport_context_); 197 transport_context_);
198 peer_connection_ = peer_connection_factory_->CreatePeerConnection( 198 peer_connection_ = peer_connection_factory_->CreatePeerConnection(
199 rtc_config, &constraints, 199 rtc_config, &constraints, std::move(port_allocator), nullptr, this);
200 rtc::scoped_ptr<cricket::PortAllocator>(port_allocator.release()),
201 nullptr, this);
202 200
203 outgoing_data_stream_adapter_.Initialize(peer_connection_); 201 outgoing_data_stream_adapter_.Initialize(peer_connection_);
204 incoming_data_stream_adapter_.Initialize(peer_connection_); 202 incoming_data_stream_adapter_.Initialize(peer_connection_);
205 203
206 event_handler_->OnWebrtcTransportConnecting(); 204 event_handler_->OnWebrtcTransportConnecting();
207 205
208 if (transport_context_->role() == TransportRole::SERVER) 206 if (transport_context_->role() == TransportRole::SERVER)
209 RequestNegotiation(); 207 RequestNegotiation();
210 } 208 }
211 209
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 peer_connection_->Close(); 565 peer_connection_->Close();
568 peer_connection_ = nullptr; 566 peer_connection_ = nullptr;
569 peer_connection_factory_ = nullptr; 567 peer_connection_factory_ = nullptr;
570 568
571 if (error != OK) 569 if (error != OK)
572 event_handler_->OnWebrtcTransportError(error); 570 event_handler_->OnWebrtcTransportError(error);
573 } 571 }
574 572
575 } // namespace protocol 573 } // namespace protocol
576 } // namespace remoting 574 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_desktop_capturer.cc ('k') | third_party/libjingle/libjingle_nacl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698