| 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 "ppapi/cpp/net_address.h" | 10 #include "ppapi/cpp/net_address.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 HandleReadResult(result, address); | 321 HandleReadResult(result, address); |
| 322 if (result > 0) { | 322 if (result > 0) { |
| 323 DoRead(); | 323 DoRead(); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 void UdpPacketSocket::HandleReadResult(int result, pp::NetAddress address) { | 327 void UdpPacketSocket::HandleReadResult(int result, pp::NetAddress address) { |
| 328 if (result > 0) { | 328 if (result > 0) { |
| 329 talk_base::SocketAddress socket_address; | 329 talk_base::SocketAddress socket_address; |
| 330 PpNetAddressToSocketAddress(address, &socket_address); | 330 PpNetAddressToSocketAddress(address, &socket_address); |
| 331 SignalReadPacket(this, &receive_buffer_[0], result, socket_address); | 331 SignalReadPacket(this, &receive_buffer_[0], result, socket_address, |
| 332 talk_base::CreatePacketTime(0)); |
| 332 } else if (result != PP_ERROR_ABORTED) { | 333 } else if (result != PP_ERROR_ABORTED) { |
| 333 LOG(ERROR) << "Received error when reading from UDP socket: " << result; | 334 LOG(ERROR) << "Received error when reading from UDP socket: " << result; |
| 334 } | 335 } |
| 335 } | 336 } |
| 336 | 337 |
| 337 } // namespace | 338 } // namespace |
| 338 | 339 |
| 339 PepperPacketSocketFactory::PepperPacketSocketFactory( | 340 PepperPacketSocketFactory::PepperPacketSocketFactory( |
| 340 const pp::InstanceHandle& instance) | 341 const pp::InstanceHandle& instance) |
| 341 : pp_instance_(instance) { | 342 : pp_instance_(instance) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 return NULL; | 376 return NULL; |
| 376 } | 377 } |
| 377 | 378 |
| 378 talk_base::AsyncResolverInterface* | 379 talk_base::AsyncResolverInterface* |
| 379 PepperPacketSocketFactory::CreateAsyncResolver() { | 380 PepperPacketSocketFactory::CreateAsyncResolver() { |
| 380 NOTREACHED(); | 381 NOTREACHED(); |
| 381 return NULL; | 382 return NULL; |
| 382 } | 383 } |
| 383 | 384 |
| 384 } // namespace remoting | 385 } // namespace remoting |
| OLD | NEW |