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

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

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed MockPluginDelegate. 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
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>
9 8
10 #include "base/bind.h" 9 #include "base/bind.h"
11 #include "base/callback.h" 10 #include "base/callback.h"
12 #include "base/command_line.h" 11 #include "base/command_line.h"
13 #include "base/file_path.h" 12 #include "base/file_path.h"
14 #include "base/file_util_proxy.h" 13 #include "base/file_util_proxy.h"
15 #include "base/logging.h" 14 #include "base/logging.h"
16 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
18 #include "base/string_split.h" 17 #include "base/string_split.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "ui/gfx/surface/transport_dib.h" 68 #include "ui/gfx/surface/transport_dib.h"
70 #include "webkit/fileapi/file_system_callback_dispatcher.h" 69 #include "webkit/fileapi/file_system_callback_dispatcher.h"
71 #include "webkit/plugins/npapi/webplugin.h" 70 #include "webkit/plugins/npapi/webplugin.h"
72 #include "webkit/plugins/ppapi/file_path.h" 71 #include "webkit/plugins/ppapi/file_path.h"
73 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 72 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
74 #include "webkit/plugins/ppapi/plugin_module.h" 73 #include "webkit/plugins/ppapi/plugin_module.h"
75 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 74 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
76 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 75 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
77 #include "webkit/plugins/ppapi/ppb_flash_impl.h" 76 #include "webkit/plugins/ppapi/ppb_flash_impl.h"
78 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" 77 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h"
78 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h"
79 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" 79 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h"
80 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" 80 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h"
81 #include "webkit/plugins/ppapi/resource_helper.h" 81 #include "webkit/plugins/ppapi/resource_helper.h"
82 #include "webkit/plugins/webplugininfo.h" 82 #include "webkit/plugins/webplugininfo.h"
83 83
84 using WebKit::WebView; 84 using WebKit::WebView;
85 using WebKit::WebFrame; 85 using WebKit::WebFrame;
86 86
87 namespace { 87 namespace {
88 88
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( 1656 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create(
1657 render_view_->routing_id(), 0, &socket_id)); 1657 render_view_->routing_id(), 0, &socket_id));
1658 return socket_id; 1658 return socket_id;
1659 } 1659 }
1660 1660
1661 void PepperPluginDelegateImpl::TCPSocketConnect( 1661 void PepperPluginDelegateImpl::TCPSocketConnect(
1662 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, 1662 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
1663 uint32 socket_id, 1663 uint32 socket_id,
1664 const std::string& host, 1664 const std::string& host,
1665 uint16_t port) { 1665 uint16_t port) {
1666 tcp_sockets_.AddWithID(socket, socket_id); 1666 RegisterTCPSocket(socket, socket_id);
1667 render_view_->Send( 1667 render_view_->Send(
1668 new PpapiHostMsg_PPBTCPSocket_Connect(socket_id, host, port)); 1668 new PpapiHostMsg_PPBTCPSocket_Connect(socket_id, host, port));
1669 } 1669 }
1670 1670
1671 void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress( 1671 void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress(
1672 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, 1672 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
1673 uint32 socket_id, 1673 uint32 socket_id,
1674 const PP_NetAddress_Private& addr) { 1674 const PP_NetAddress_Private& addr) {
1675 tcp_sockets_.AddWithID(socket, socket_id); 1675 RegisterTCPSocket(socket, socket_id);
1676 render_view_->Send( 1676 render_view_->Send(
1677 new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(socket_id, addr)); 1677 new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(socket_id, addr));
1678 } 1678 }
1679 1679
1680 void PepperPluginDelegateImpl::TCPSocketSSLHandshake( 1680 void PepperPluginDelegateImpl::TCPSocketSSLHandshake(
1681 uint32 socket_id, 1681 uint32 socket_id,
1682 const std::string& server_name, 1682 const std::string& server_name,
1683 uint16_t server_port) { 1683 uint16_t server_port) {
1684 DCHECK(tcp_sockets_.Lookup(socket_id)); 1684 DCHECK(tcp_sockets_.Lookup(socket_id));
1685 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_SSLHandshake( 1685 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_SSLHandshake(
(...skipping 14 matching lines...) Expand all
1700 } 1700 }
1701 1701
1702 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) { 1702 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) {
1703 // There are no DCHECK(tcp_sockets_.Lookup(socket_id)) because it 1703 // There are no DCHECK(tcp_sockets_.Lookup(socket_id)) because it
1704 // can be called before 1704 // can be called before
1705 // TCPSocketConnect/TCPSocketConnectWithNetAddress is called. 1705 // TCPSocketConnect/TCPSocketConnectWithNetAddress is called.
1706 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id)); 1706 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id));
1707 tcp_sockets_.Remove(socket_id); 1707 tcp_sockets_.Remove(socket_id);
1708 } 1708 }
1709 1709
1710 void PepperPluginDelegateImpl::RegisterTCPSocket(
1711 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
1712 uint32 socket_id) {
1713 tcp_sockets_.AddWithID(socket, socket_id);
1714 }
1715
1710 uint32 PepperPluginDelegateImpl::UDPSocketCreate() { 1716 uint32 PepperPluginDelegateImpl::UDPSocketCreate() {
1711 if (!CanUseSocketAPIs()) 1717 if (!CanUseSocketAPIs())
1712 return 0; 1718 return 0;
1713 1719
1714 uint32 socket_id = 0; 1720 uint32 socket_id = 0;
1715 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create( 1721 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create(
1716 render_view_->routing_id(), 0, &socket_id)); 1722 render_view_->routing_id(), 0, &socket_id));
1717 return socket_id; 1723 return socket_id;
1718 } 1724 }
1719 1725
(...skipping 21 matching lines...) Expand all
1741 new PpapiHostMsg_PPBUDPSocket_SendTo(socket_id, buffer, net_addr)); 1747 new PpapiHostMsg_PPBUDPSocket_SendTo(socket_id, buffer, net_addr));
1742 } 1748 }
1743 1749
1744 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) { 1750 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) {
1745 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it 1751 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it
1746 // can be called before UDPSocketBind is called. 1752 // can be called before UDPSocketBind is called.
1747 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id)); 1753 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id));
1748 udp_sockets_.Remove(socket_id); 1754 udp_sockets_.Remove(socket_id);
1749 } 1755 }
1750 1756
1757 void PepperPluginDelegateImpl::TCPServerSocketListen(
1758 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket,
1759 uint32 temp_socket_id,
1760 const PP_NetAddress_Private& addr,
1761 int32_t backlog) {
1762 uninitialized_tcp_server_sockets_.AddWithID(socket, temp_socket_id);
1763 render_view_->Send(
1764 new PpapiHostMsg_PPBTCPServerSocket_Listen(
1765 render_view_->routing_id(), 0, temp_socket_id, addr, backlog));
1766 }
1767
1768 void PepperPluginDelegateImpl::TCPServerSocketAccept(uint32 real_socket_id) {
1769 DCHECK(tcp_server_sockets_.Lookup(real_socket_id));
1770 render_view_->Send(new PpapiHostMsg_PPBTCPServerSocket_Accept(
1771 real_socket_id));
1772 }
1773
1774 void PepperPluginDelegateImpl::TCPServerSocketStopListening(
1775 uint32 real_socket_id,
1776 uint32 temp_socket_id) {
1777 if (real_socket_id == 0) {
1778 if (uninitialized_tcp_server_sockets_.Lookup(temp_socket_id)) {
1779 // Pending Listen request.
1780 uninitialized_tcp_server_sockets_.Remove(temp_socket_id);
1781 }
1782 } else {
1783 render_view_->Send(
1784 new PpapiHostMsg_PPBTCPServerSocket_Destroy(real_socket_id));
1785 tcp_server_sockets_.Remove(real_socket_id);
1786 }
1787 }
1788
1751 int32_t PepperPluginDelegateImpl::ShowContextMenu( 1789 int32_t PepperPluginDelegateImpl::ShowContextMenu(
1752 webkit::ppapi::PluginInstance* instance, 1790 webkit::ppapi::PluginInstance* instance,
1753 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 1791 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
1754 const gfx::Point& position) { 1792 const gfx::Point& position) {
1755 int32 render_widget_id = render_view_->routing_id(); 1793 int32 render_widget_id = render_view_->routing_id();
1756 if (instance->FlashIsFullscreen(instance->pp_instance())) { 1794 if (instance->FlashIsFullscreen(instance->pp_instance())) {
1757 webkit::ppapi::FullscreenContainer* container = 1795 webkit::ppapi::FullscreenContainer* container =
1758 instance->fullscreen_container(); 1796 instance->fullscreen_container();
1759 DCHECK(container); 1797 DCHECK(container);
1760 render_widget_id = 1798 render_widget_id =
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK, 2009 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK,
1972 OnTCPSocketConnectACK) 2010 OnTCPSocketConnectACK)
1973 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, 2011 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK,
1974 OnTCPSocketSSLHandshakeACK) 2012 OnTCPSocketSSLHandshakeACK)
1975 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK) 2013 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK)
1976 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK) 2014 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK)
1977 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK) 2015 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK)
1978 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_RecvFromACK, 2016 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_RecvFromACK,
1979 OnUDPSocketRecvFromACK) 2017 OnUDPSocketRecvFromACK)
1980 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, OnUDPSocketSendToACK) 2018 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, OnUDPSocketSendToACK)
2019 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_ListenACK,
2020 OnTCPServerSocketListenACK)
2021 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_AcceptACK,
2022 OnTCPServerSocketAcceptACK)
1981 IPC_MESSAGE_UNHANDLED(handled = false) 2023 IPC_MESSAGE_UNHANDLED(handled = false)
1982 IPC_END_MESSAGE_MAP() 2024 IPC_END_MESSAGE_MAP()
1983 return handled; 2025 return handled;
1984 } 2026 }
1985 2027
1986 void PepperPluginDelegateImpl::OnDestruct() { 2028 void PepperPluginDelegateImpl::OnDestruct() {
1987 // Nothing to do here. Default implementation in RenderViewObserver does 2029 // Nothing to do here. Default implementation in RenderViewObserver does
1988 // 'delete this' but it's not suitable for PepperPluginDelegateImpl because 2030 // 'delete this' but it's not suitable for PepperPluginDelegateImpl because
1989 // it's non-pointer member in RenderViewImpl. 2031 // it's non-pointer member in RenderViewImpl.
1990 } 2032 }
1991 2033
1992 void PepperPluginDelegateImpl::OnTCPSocketConnectACK( 2034 void PepperPluginDelegateImpl::OnTCPSocketConnectACK(
1993 uint32 plugin_dispatcher_id, 2035 uint32 plugin_dispatcher_id,
1994 uint32 socket_id, 2036 uint32 socket_id,
1995 bool succeeded, 2037 bool succeeded,
1996 const PP_NetAddress_Private& local_addr, 2038 const PP_NetAddress_Private& local_addr,
1997 const PP_NetAddress_Private& remote_addr) { 2039 const PP_NetAddress_Private& remote_addr) {
1998 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = 2040 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket =
1999 tcp_sockets_.Lookup(socket_id); 2041 tcp_sockets_.Lookup(socket_id);
2000 if (socket) 2042 if (socket)
2001 socket->OnConnectCompleted(succeeded, local_addr, remote_addr); 2043 socket->OnConnectCompleted(succeeded, local_addr, remote_addr);
2044 if (!succeeded)
2045 tcp_sockets_.Remove(socket_id);
2002 } 2046 }
2003 2047
2004 void PepperPluginDelegateImpl::OnTCPSocketSSLHandshakeACK( 2048 void PepperPluginDelegateImpl::OnTCPSocketSSLHandshakeACK(
2005 uint32 plugin_dispatcher_id, 2049 uint32 plugin_dispatcher_id,
2006 uint32 socket_id, 2050 uint32 socket_id,
2007 bool succeeded) { 2051 bool succeeded) {
2008 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = 2052 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket =
2009 tcp_sockets_.Lookup(socket_id); 2053 tcp_sockets_.Lookup(socket_id);
2010 if (socket) 2054 if (socket)
2011 socket->OnSSLHandshakeCompleted(succeeded); 2055 socket->OnSSLHandshakeCompleted(succeeded);
(...skipping 19 matching lines...) Expand all
2031 socket->OnWriteCompleted(succeeded, bytes_written); 2075 socket->OnWriteCompleted(succeeded, bytes_written);
2032 } 2076 }
2033 2077
2034 void PepperPluginDelegateImpl::OnUDPSocketBindACK(uint32 plugin_dispatcher_id, 2078 void PepperPluginDelegateImpl::OnUDPSocketBindACK(uint32 plugin_dispatcher_id,
2035 uint32 socket_id, 2079 uint32 socket_id,
2036 bool succeeded) { 2080 bool succeeded) {
2037 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = 2081 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
2038 udp_sockets_.Lookup(socket_id); 2082 udp_sockets_.Lookup(socket_id);
2039 if (socket) 2083 if (socket)
2040 socket->OnBindCompleted(succeeded); 2084 socket->OnBindCompleted(succeeded);
2085 if (!succeeded)
2086 udp_sockets_.Remove(socket_id);
2041 } 2087 }
2042 2088
2043 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( 2089 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK(
2044 uint32 plugin_dispatcher_id, 2090 uint32 plugin_dispatcher_id,
2045 uint32 socket_id, 2091 uint32 socket_id,
2046 bool succeeded, 2092 bool succeeded,
2047 const std::string& data, 2093 const std::string& data,
2048 const PP_NetAddress_Private& remote_addr) { 2094 const PP_NetAddress_Private& remote_addr) {
2049 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = 2095 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
2050 udp_sockets_.Lookup(socket_id); 2096 udp_sockets_.Lookup(socket_id);
2051 if (socket) 2097 if (socket)
2052 socket->OnRecvFromCompleted(succeeded, data, remote_addr); 2098 socket->OnRecvFromCompleted(succeeded, data, remote_addr);
2053 } 2099 }
2054 2100
2055 void PepperPluginDelegateImpl::OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, 2101 void PepperPluginDelegateImpl::OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
2056 uint32 socket_id, 2102 uint32 socket_id,
2057 bool succeeded, 2103 bool succeeded,
2058 int32_t bytes_written) { 2104 int32_t bytes_written) {
2059 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = 2105 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
2060 udp_sockets_.Lookup(socket_id); 2106 udp_sockets_.Lookup(socket_id);
2061 if (socket) 2107 if (socket)
2062 socket->OnSendToCompleted(succeeded, bytes_written); 2108 socket->OnSendToCompleted(succeeded, bytes_written);
2063 } 2109 }
2064 2110
2111 void PepperPluginDelegateImpl::OnTCPServerSocketListenACK(
2112 uint32 plugin_dispatcher_id,
2113 uint32 real_socket_id,
2114 uint32 temp_socket_id,
2115 int32_t status) {
2116 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket =
2117 uninitialized_tcp_server_sockets_.Lookup(temp_socket_id);
2118 if (socket == NULL) {
2119 render_view_->Send(
yzshen1 2012/02/14 18:26:31 nit: it is good to have a comment why socket can b
ygorshenin1 2012/02/14 20:27:43 Done.
2120 new PpapiHostMsg_PPBTCPServerSocket_Destroy(real_socket_id));
2121 } else {
2122 uninitialized_tcp_server_sockets_.Remove(temp_socket_id);
2123
2124 if (status == PP_OK)
2125 tcp_server_sockets_.AddWithID(socket, real_socket_id);
2126 socket->OnListenCompleted(real_socket_id, status);
2127 }
2128 }
2129
2130 void PepperPluginDelegateImpl::OnTCPServerSocketAcceptACK(
2131 uint32 plugin_dispatcher_id,
2132 uint32 real_server_socket_id,
2133 uint32 accepted_socket_id,
2134 const PP_NetAddress_Private& local_addr,
2135 const PP_NetAddress_Private& remote_addr) {
2136 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket =
2137 tcp_server_sockets_.Lookup(real_server_socket_id);
2138 if (socket) {
2139 bool succeeded = accepted_socket_id != 0;
2140 socket->OnAcceptCompleted(succeeded,
2141 accepted_socket_id,
2142 local_addr,
2143 remote_addr);
2144 }
2145 }
2146
2065 int PepperPluginDelegateImpl::GetRoutingId() const { 2147 int PepperPluginDelegateImpl::GetRoutingId() const {
2066 return render_view_->routing_id(); 2148 return render_view_->routing_id();
2067 } 2149 }
2068 2150
2069 ContentGLContext* 2151 ContentGLContext*
2070 PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() { 2152 PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() {
2071 WebGraphicsContext3DCommandBufferImpl* context = 2153 WebGraphicsContext3DCommandBufferImpl* context =
2072 static_cast<WebGraphicsContext3DCommandBufferImpl*>( 2154 static_cast<WebGraphicsContext3DCommandBufferImpl*>(
2073 render_view_->webview()->graphicsContext3D()); 2155 render_view_->webview()->graphicsContext3D());
2074 if (!context) 2156 if (!context)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( 2188 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter(
2107 webkit::ppapi::PluginInstance* instance) { 2189 webkit::ppapi::PluginInstance* instance) {
2108 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); 2190 LockTargetMap::iterator it = mouse_lock_instances_.find(instance);
2109 if (it != mouse_lock_instances_.end()) { 2191 if (it != mouse_lock_instances_.end()) {
2110 MouseLockDispatcher::LockTarget* target = it->second; 2192 MouseLockDispatcher::LockTarget* target = it->second;
2111 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); 2193 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target);
2112 delete target; 2194 delete target;
2113 mouse_lock_instances_.erase(it); 2195 mouse_lock_instances_.erase(it);
2114 } 2196 }
2115 } 2197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698