| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_factory.h" | 5 #include "remoting/client/plugin/pepper_port_allocator_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "remoting/client/plugin/pepper_network_manager.h" | 8 #include "remoting/client/plugin/pepper_network_manager.h" |
| 9 #include "remoting/client/plugin/pepper_packet_socket_factory.h" | 9 #include "remoting/client/plugin/pepper_packet_socket_factory.h" |
| 10 #include "remoting/protocol/port_allocator.h" | 10 #include "remoting/protocol/port_allocator.h" |
| 11 #include "remoting/protocol/transport_context.h" | 11 #include "remoting/protocol/transport_context.h" |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 | 14 |
| 15 PepperPortAllocatorFactory::PepperPortAllocatorFactory( | 15 PepperPortAllocatorFactory::PepperPortAllocatorFactory( |
| 16 pp::InstanceHandle pp_instance) | 16 pp::InstanceHandle pp_instance) |
| 17 : pp_instance_(pp_instance) {} | 17 : pp_instance_(pp_instance) {} |
| 18 | 18 |
| 19 PepperPortAllocatorFactory::~PepperPortAllocatorFactory() {} | 19 PepperPortAllocatorFactory::~PepperPortAllocatorFactory() {} |
| 20 | 20 |
| 21 std::unique_ptr<cricket::PortAllocator> | 21 std::unique_ptr<cricket::PortAllocator> |
| 22 PepperPortAllocatorFactory::CreatePortAllocator( | 22 PepperPortAllocatorFactory::CreatePortAllocator( |
| 23 scoped_refptr<protocol::TransportContext> transport_context) { | 23 scoped_refptr<protocol::TransportContext> transport_context) { |
| 24 return base::WrapUnique(new protocol::PortAllocator( | 24 return base::MakeUnique<protocol::PortAllocator>( |
| 25 base::WrapUnique(new PepperNetworkManager(pp_instance_)), | 25 base::WrapUnique(new PepperNetworkManager(pp_instance_)), |
| 26 base::WrapUnique(new PepperPacketSocketFactory(pp_instance_)), | 26 base::WrapUnique(new PepperPacketSocketFactory(pp_instance_)), |
| 27 transport_context)); | 27 transport_context); |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace remoting | 30 } // namespace remoting |
| OLD | NEW |