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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 PepperPacketSocketFactory::~PepperPacketSocketFactory() { | 407 PepperPacketSocketFactory::~PepperPacketSocketFactory() { |
408 } | 408 } |
409 | 409 |
410 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( | 410 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( |
411 const rtc::SocketAddress& local_address, | 411 const rtc::SocketAddress& local_address, |
412 uint16 min_port, | 412 uint16 min_port, |
413 uint16 max_port) { | 413 uint16 max_port) { |
414 scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_)); | 414 scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_)); |
415 if (!result->Init(local_address, min_port, max_port)) | 415 if (!result->Init(local_address, min_port, max_port)) |
416 return NULL; | 416 return nullptr; |
417 return result.release(); | 417 return result.release(); |
418 } | 418 } |
419 | 419 |
420 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket( | 420 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket( |
421 const rtc::SocketAddress& local_address, | 421 const rtc::SocketAddress& local_address, |
422 uint16 min_port, | 422 uint16 min_port, |
423 uint16 max_port, | 423 uint16 max_port, |
424 int opts) { | 424 int opts) { |
425 // We don't use TCP sockets for remoting connections. | 425 // We don't use TCP sockets for remoting connections. |
426 NOTREACHED(); | 426 NOTREACHED(); |
427 return NULL; | 427 return nullptr; |
428 } | 428 } |
429 | 429 |
430 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateClientTcpSocket( | 430 rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateClientTcpSocket( |
431 const rtc::SocketAddress& local_address, | 431 const rtc::SocketAddress& local_address, |
432 const rtc::SocketAddress& remote_address, | 432 const rtc::SocketAddress& remote_address, |
433 const rtc::ProxyInfo& proxy_info, | 433 const rtc::ProxyInfo& proxy_info, |
434 const std::string& user_agent, | 434 const std::string& user_agent, |
435 int opts) { | 435 int opts) { |
436 // We don't use TCP sockets for remoting connections. | 436 // We don't use TCP sockets for remoting connections. |
437 NOTREACHED(); | 437 NOTREACHED(); |
438 return NULL; | 438 return nullptr; |
439 } | 439 } |
440 | 440 |
441 rtc::AsyncResolverInterface* | 441 rtc::AsyncResolverInterface* |
442 PepperPacketSocketFactory::CreateAsyncResolver() { | 442 PepperPacketSocketFactory::CreateAsyncResolver() { |
443 return new PepperAddressResolver(pp_instance_); | 443 return new PepperAddressResolver(pp_instance_); |
444 } | 444 } |
445 | 445 |
446 } // namespace remoting | 446 } // namespace remoting |
OLD | NEW |