Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add GetBoundAddress to retrieve address we bound to. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, 2026 void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
2027 uint32 socket_id, 2027 uint32 socket_id,
2028 bool succeeded, 2028 bool succeeded,
2029 int32_t bytes_written) { 2029 int32_t bytes_written) {
2030 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = 2030 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket =
2031 tcp_sockets_.Lookup(socket_id); 2031 tcp_sockets_.Lookup(socket_id);
2032 if (socket) 2032 if (socket)
2033 socket->OnWriteCompleted(succeeded, bytes_written); 2033 socket->OnWriteCompleted(succeeded, bytes_written);
2034 } 2034 }
2035 2035
2036 void PepperPluginDelegateImpl::OnUDPSocketBindACK(uint32 plugin_dispatcher_id, 2036 void PepperPluginDelegateImpl::OnUDPSocketBindACK(
2037 uint32 socket_id, 2037 uint32 plugin_dispatcher_id,
2038 bool succeeded) { 2038 uint32 socket_id,
2039 bool succeeded,
2040 const PP_NetAddress_Private& bound_addr) {
yzshen1 2012/02/06 06:51:27 Please use the same name as the declaration.
mtilburg1 2012/02/06 15:11:35 Done.
2039 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = 2041 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
2040 udp_sockets_.Lookup(socket_id); 2042 udp_sockets_.Lookup(socket_id);
2041 if (socket) 2043 if (socket)
2042 socket->OnBindCompleted(succeeded); 2044 socket->OnBindCompleted(succeeded, bound_addr);
2043 } 2045 }
2044 2046
2045 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( 2047 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK(
2046 uint32 plugin_dispatcher_id, 2048 uint32 plugin_dispatcher_id,
2047 uint32 socket_id, 2049 uint32 socket_id,
2048 bool succeeded, 2050 bool succeeded,
2049 const std::string& data, 2051 const std::string& data,
2050 const PP_NetAddress_Private& remote_addr) { 2052 const PP_NetAddress_Private& remote_addr) {
2051 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = 2053 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
2052 udp_sockets_.Lookup(socket_id); 2054 udp_sockets_.Lookup(socket_id);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( 2110 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter(
2109 webkit::ppapi::PluginInstance* instance) { 2111 webkit::ppapi::PluginInstance* instance) {
2110 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); 2112 LockTargetMap::iterator it = mouse_lock_instances_.find(instance);
2111 if (it != mouse_lock_instances_.end()) { 2113 if (it != mouse_lock_instances_.end()) {
2112 MouseLockDispatcher::LockTarget* target = it->second; 2114 MouseLockDispatcher::LockTarget* target = it->second;
2113 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); 2115 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target);
2114 delete target; 2116 delete target;
2115 mouse_lock_instances_.erase(it); 2117 mouse_lock_instances_.erase(it);
2116 } 2118 }
2117 } 2119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698