| 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/client/plugin/pepper_packet_socket_factory.h" | 5 #include "remoting/client/plugin/pepper_packet_socket_factory.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 : pp_instance_(instance) { | 407 : pp_instance_(instance) { |
| 408 } | 408 } |
| 409 | 409 |
| 410 PepperPacketSocketFactory::~PepperPacketSocketFactory() { | 410 PepperPacketSocketFactory::~PepperPacketSocketFactory() { |
| 411 } | 411 } |
| 412 | 412 |
| 413 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( | 413 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( |
| 414 const rtc::SocketAddress& local_address, | 414 const rtc::SocketAddress& local_address, |
| 415 uint16_t min_port, | 415 uint16_t min_port, |
| 416 uint16_t max_port) { | 416 uint16_t max_port) { |
| 417 scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_)); | 417 std::unique_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_)); |
| 418 if (!result->Init(local_address, min_port, max_port)) | 418 if (!result->Init(local_address, min_port, max_port)) |
| 419 return nullptr; | 419 return nullptr; |
| 420 return result.release(); | 420 return result.release(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket( | 423 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket( |
| 424 const rtc::SocketAddress& local_address, | 424 const rtc::SocketAddress& local_address, |
| 425 uint16_t min_port, | 425 uint16_t min_port, |
| 426 uint16_t max_port, | 426 uint16_t max_port, |
| 427 int opts) { | 427 int opts) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 440 NOTREACHED(); | 440 NOTREACHED(); |
| 441 return nullptr; | 441 return nullptr; |
| 442 } | 442 } |
| 443 | 443 |
| 444 rtc::AsyncResolverInterface* | 444 rtc::AsyncResolverInterface* |
| 445 PepperPacketSocketFactory::CreateAsyncResolver() { | 445 PepperPacketSocketFactory::CreateAsyncResolver() { |
| 446 return new PepperAddressResolver(pp_instance_); | 446 return new PepperAddressResolver(pp_instance_); |
| 447 } | 447 } |
| 448 | 448 |
| 449 } // namespace remoting | 449 } // namespace remoting |
| OLD | NEW |