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 "content/renderer/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, | 2024 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, |
2025 uint32 socket_id, | 2025 uint32 socket_id, |
2026 bool succeeded, | 2026 bool succeeded, |
2027 int32_t bytes_written) { | 2027 int32_t bytes_written) { |
2028 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = | 2028 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = |
2029 tcp_sockets_.Lookup(socket_id); | 2029 tcp_sockets_.Lookup(socket_id); |
2030 if (socket) | 2030 if (socket) |
2031 socket->OnWriteCompleted(succeeded, bytes_written); | 2031 socket->OnWriteCompleted(succeeded, bytes_written); |
2032 } | 2032 } |
2033 | 2033 |
2034 void PepperPluginDelegateImpl::OnUDPSocketBindACK(uint32 plugin_dispatcher_id, | 2034 void PepperPluginDelegateImpl::OnUDPSocketBindACK( |
2035 uint32 socket_id, | 2035 uint32 plugin_dispatcher_id, |
2036 bool succeeded) { | 2036 uint32 socket_id, |
| 2037 bool succeeded, |
| 2038 const PP_NetAddress_Private& addr) { |
2037 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2039 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
2038 udp_sockets_.Lookup(socket_id); | 2040 udp_sockets_.Lookup(socket_id); |
2039 if (socket) | 2041 if (socket) |
2040 socket->OnBindCompleted(succeeded); | 2042 socket->OnBindCompleted(succeeded, addr); |
2041 } | 2043 } |
2042 | 2044 |
2043 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( | 2045 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( |
2044 uint32 plugin_dispatcher_id, | 2046 uint32 plugin_dispatcher_id, |
2045 uint32 socket_id, | 2047 uint32 socket_id, |
2046 bool succeeded, | 2048 bool succeeded, |
2047 const std::string& data, | 2049 const std::string& data, |
2048 const PP_NetAddress_Private& remote_addr) { | 2050 const PP_NetAddress_Private& remote_addr) { |
2049 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2051 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
2050 udp_sockets_.Lookup(socket_id); | 2052 udp_sockets_.Lookup(socket_id); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( | 2108 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( |
2107 webkit::ppapi::PluginInstance* instance) { | 2109 webkit::ppapi::PluginInstance* instance) { |
2108 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); | 2110 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); |
2109 if (it != mouse_lock_instances_.end()) { | 2111 if (it != mouse_lock_instances_.end()) { |
2110 MouseLockDispatcher::LockTarget* target = it->second; | 2112 MouseLockDispatcher::LockTarget* target = it->second; |
2111 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); | 2113 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); |
2112 delete target; | 2114 delete target; |
2113 mouse_lock_instances_.erase(it); | 2115 mouse_lock_instances_.erase(it); |
2114 } | 2116 } |
2115 } | 2117 } |
OLD | NEW |