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

Side by Side Diff: remoting/client/plugin/pepper_port_allocator.cc

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/client/plugin/pepper_port_allocator.h ('k') | remoting/host/cast_extension_session.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/client/plugin/pepper_port_allocator.h" 5 #include "remoting/client/plugin/pepper_port_allocator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/base/net_util.h" 9 #include "net/base/net_util.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 PepperPortAllocator::PepperPortAllocator( 218 PepperPortAllocator::PepperPortAllocator(
219 const pp::InstanceHandle& instance, 219 const pp::InstanceHandle& instance,
220 scoped_ptr<rtc::NetworkManager> network_manager, 220 scoped_ptr<rtc::NetworkManager> network_manager,
221 scoped_ptr<rtc::PacketSocketFactory> socket_factory) 221 scoped_ptr<rtc::PacketSocketFactory> socket_factory)
222 : HttpPortAllocatorBase(network_manager.get(), 222 : HttpPortAllocatorBase(network_manager.get(),
223 socket_factory.get(), 223 socket_factory.get(),
224 std::string()), 224 std::string()),
225 instance_(instance), 225 instance_(instance),
226 network_manager_(network_manager.Pass()), 226 network_manager_(network_manager.Pass()),
227 socket_factory_(socket_factory.Pass()) { 227 socket_factory_(socket_factory.Pass()) {
228 // TCP transport is disabled becase PseudoTCP works poorly over
229 // it. ENABLE_SHARED_UFRAG flag is specified so that the same
230 // username fragment is shared between all candidates for this
231 // channel.
232 set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
233 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG|
234 cricket::PORTALLOCATOR_ENABLE_IPV6);
235 } 228 }
236 229
237 PepperPortAllocator::~PepperPortAllocator() { 230 PepperPortAllocator::~PepperPortAllocator() {}
238 }
239 231
240 cricket::PortAllocatorSession* PepperPortAllocator::CreateSessionInternal( 232 cricket::PortAllocatorSession* PepperPortAllocator::CreateSessionInternal(
241 const std::string& content_name, 233 const std::string& content_name,
242 int component, 234 int component,
243 const std::string& ice_username_fragment, 235 const std::string& ice_username_fragment,
244 const std::string& ice_password) { 236 const std::string& ice_password) {
245 return new PepperPortAllocatorSession( 237 return new PepperPortAllocatorSession(
246 this, content_name, component, ice_username_fragment, ice_password, 238 this, content_name, component, ice_username_fragment, ice_password,
247 stun_hosts(), relay_hosts(), relay_token(), instance_); 239 stun_hosts(), relay_hosts(), relay_token(), instance_);
248 } 240 }
249 241
242 PepperPortAllocatorFactory::PepperPortAllocatorFactory(
243 const pp::InstanceHandle& instance)
244 : instance_(instance) {}
245
246 PepperPortAllocatorFactory::~PepperPortAllocatorFactory() {}
247
248 scoped_ptr<cricket::HttpPortAllocatorBase>
249 PepperPortAllocatorFactory::CreatePortAllocator() {
250 return PepperPortAllocator::Create(instance_);
251 }
252
250 } // namespace remoting 253 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_port_allocator.h ('k') | remoting/host/cast_extension_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698