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 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, | 2027 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, |
2028 uint32 socket_id, | 2028 uint32 socket_id, |
2029 bool succeeded, | 2029 bool succeeded, |
2030 int32_t bytes_written) { | 2030 int32_t bytes_written) { |
2031 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = | 2031 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = |
2032 tcp_sockets_.Lookup(socket_id); | 2032 tcp_sockets_.Lookup(socket_id); |
2033 if (socket) | 2033 if (socket) |
2034 socket->OnWriteCompleted(succeeded, bytes_written); | 2034 socket->OnWriteCompleted(succeeded, bytes_written); |
2035 } | 2035 } |
2036 | 2036 |
2037 void PepperPluginDelegateImpl::OnUDPSocketBindACK(uint32 plugin_dispatcher_id, | 2037 void PepperPluginDelegateImpl::OnUDPSocketBindACK( |
2038 uint32 socket_id, | 2038 uint32 plugin_dispatcher_id, |
2039 bool succeeded) { | 2039 uint32 socket_id, |
| 2040 bool succeeded, |
| 2041 const PP_NetAddress_Private& addr) { |
2040 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2042 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
2041 udp_sockets_.Lookup(socket_id); | 2043 udp_sockets_.Lookup(socket_id); |
2042 if (socket) | 2044 if (socket) |
2043 socket->OnBindCompleted(succeeded); | 2045 socket->OnBindCompleted(succeeded, addr); |
2044 } | 2046 } |
2045 | 2047 |
2046 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( | 2048 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( |
2047 uint32 plugin_dispatcher_id, | 2049 uint32 plugin_dispatcher_id, |
2048 uint32 socket_id, | 2050 uint32 socket_id, |
2049 bool succeeded, | 2051 bool succeeded, |
2050 const std::string& data, | 2052 const std::string& data, |
2051 const PP_NetAddress_Private& remote_addr) { | 2053 const PP_NetAddress_Private& remote_addr) { |
2052 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2054 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
2053 udp_sockets_.Lookup(socket_id); | 2055 udp_sockets_.Lookup(socket_id); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( | 2111 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( |
2110 webkit::ppapi::PluginInstance* instance) { | 2112 webkit::ppapi::PluginInstance* instance) { |
2111 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); | 2113 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); |
2112 if (it != mouse_lock_instances_.end()) { | 2114 if (it != mouse_lock_instances_.end()) { |
2113 MouseLockDispatcher::LockTarget* target = it->second; | 2115 MouseLockDispatcher::LockTarget* target = it->second; |
2114 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); | 2116 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); |
2115 delete target; | 2117 delete target; |
2116 mouse_lock_instances_.erase(it); | 2118 mouse_lock_instances_.erase(it); |
2117 } | 2119 } |
2118 } | 2120 } |
OLD | NEW |