| 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/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "ui/gfx/surface/transport_dib.h" | 72 #include "ui/gfx/surface/transport_dib.h" |
| 73 #include "webkit/fileapi/file_system_callback_dispatcher.h" | 73 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| 74 #include "webkit/plugins/npapi/webplugin.h" | 74 #include "webkit/plugins/npapi/webplugin.h" |
| 75 #include "webkit/plugins/ppapi/file_path.h" | 75 #include "webkit/plugins/ppapi/file_path.h" |
| 76 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" | 76 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" |
| 77 #include "webkit/plugins/ppapi/plugin_module.h" | 77 #include "webkit/plugins/ppapi/plugin_module.h" |
| 78 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 78 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 79 #include "webkit/plugins/ppapi/ppb_broker_impl.h" | 79 #include "webkit/plugins/ppapi/ppb_broker_impl.h" |
| 80 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 80 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 81 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" | 81 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" |
| 82 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" |
| 82 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | 83 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
| 83 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" | 84 #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" |
| 84 #include "webkit/plugins/ppapi/resource_helper.h" | 85 #include "webkit/plugins/ppapi/resource_helper.h" |
| 85 #include "webkit/plugins/webplugininfo.h" | 86 #include "webkit/plugins/webplugininfo.h" |
| 86 | 87 |
| 87 using WebKit::WebView; | 88 using WebKit::WebView; |
| 88 using WebKit::WebFrame; | 89 using WebKit::WebFrame; |
| 89 | 90 |
| 90 namespace { | 91 namespace { |
| 91 | 92 |
| (...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( | 1768 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( |
| 1768 render_view_->routing_id(), 0, &socket_id)); | 1769 render_view_->routing_id(), 0, &socket_id)); |
| 1769 return socket_id; | 1770 return socket_id; |
| 1770 } | 1771 } |
| 1771 | 1772 |
| 1772 void PepperPluginDelegateImpl::TCPSocketConnect( | 1773 void PepperPluginDelegateImpl::TCPSocketConnect( |
| 1773 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 1774 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 1774 uint32 socket_id, | 1775 uint32 socket_id, |
| 1775 const std::string& host, | 1776 const std::string& host, |
| 1776 uint16_t port) { | 1777 uint16_t port) { |
| 1777 tcp_sockets_.AddWithID(socket, socket_id); | 1778 RegisterTCPSocket(socket, socket_id); |
| 1778 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Connect( | 1779 render_view_->Send( |
| 1779 render_view_->routing_id(), socket_id, host, port)); | 1780 new PpapiHostMsg_PPBTCPSocket_Connect( |
| 1781 render_view_->routing_id(), socket_id, host, port)); |
| 1780 } | 1782 } |
| 1781 | 1783 |
| 1782 void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress( | 1784 void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress( |
| 1783 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 1785 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 1784 uint32 socket_id, | 1786 uint32 socket_id, |
| 1785 const PP_NetAddress_Private& addr) { | 1787 const PP_NetAddress_Private& addr) { |
| 1786 tcp_sockets_.AddWithID(socket, socket_id); | 1788 RegisterTCPSocket(socket, socket_id); |
| 1787 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress( | 1789 render_view_->Send( |
| 1788 render_view_->routing_id(), socket_id, addr)); | 1790 new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress( |
| 1791 render_view_->routing_id(), socket_id, addr)); |
| 1789 } | 1792 } |
| 1790 | 1793 |
| 1791 void PepperPluginDelegateImpl::TCPSocketSSLHandshake( | 1794 void PepperPluginDelegateImpl::TCPSocketSSLHandshake( |
| 1792 uint32 socket_id, | 1795 uint32 socket_id, |
| 1793 const std::string& server_name, | 1796 const std::string& server_name, |
| 1794 uint16_t server_port) { | 1797 uint16_t server_port) { |
| 1795 DCHECK(tcp_sockets_.Lookup(socket_id)); | 1798 DCHECK(tcp_sockets_.Lookup(socket_id)); |
| 1796 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_SSLHandshake( | 1799 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_SSLHandshake( |
| 1797 socket_id, server_name, server_port)); | 1800 socket_id, server_name, server_port)); |
| 1798 } | 1801 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1812 | 1815 |
| 1813 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) { | 1816 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) { |
| 1814 // There are no DCHECK(tcp_sockets_.Lookup(socket_id)) because it | 1817 // There are no DCHECK(tcp_sockets_.Lookup(socket_id)) because it |
| 1815 // can be called before | 1818 // can be called before |
| 1816 // TCPSocketConnect/TCPSocketConnectWithNetAddress is called. | 1819 // TCPSocketConnect/TCPSocketConnectWithNetAddress is called. |
| 1817 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id)); | 1820 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id)); |
| 1818 if (tcp_sockets_.Lookup(socket_id)) | 1821 if (tcp_sockets_.Lookup(socket_id)) |
| 1819 tcp_sockets_.Remove(socket_id); | 1822 tcp_sockets_.Remove(socket_id); |
| 1820 } | 1823 } |
| 1821 | 1824 |
| 1825 void PepperPluginDelegateImpl::RegisterTCPSocket( |
| 1826 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 1827 uint32 socket_id) { |
| 1828 tcp_sockets_.AddWithID(socket, socket_id); |
| 1829 } |
| 1830 |
| 1822 uint32 PepperPluginDelegateImpl::UDPSocketCreate() { | 1831 uint32 PepperPluginDelegateImpl::UDPSocketCreate() { |
| 1823 uint32 socket_id = 0; | 1832 uint32 socket_id = 0; |
| 1824 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create( | 1833 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create( |
| 1825 render_view_->routing_id(), 0, &socket_id)); | 1834 render_view_->routing_id(), 0, &socket_id)); |
| 1826 return socket_id; | 1835 return socket_id; |
| 1827 } | 1836 } |
| 1828 | 1837 |
| 1829 void PepperPluginDelegateImpl::UDPSocketBind( | 1838 void PepperPluginDelegateImpl::UDPSocketBind( |
| 1830 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | 1839 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, |
| 1831 uint32 socket_id, | 1840 uint32 socket_id, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1852 } | 1861 } |
| 1853 | 1862 |
| 1854 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) { | 1863 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) { |
| 1855 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it | 1864 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it |
| 1856 // can be called before UDPSocketBind is called. | 1865 // can be called before UDPSocketBind is called. |
| 1857 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id)); | 1866 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id)); |
| 1858 if (udp_sockets_.Lookup(socket_id)) | 1867 if (udp_sockets_.Lookup(socket_id)) |
| 1859 udp_sockets_.Remove(socket_id); | 1868 udp_sockets_.Remove(socket_id); |
| 1860 } | 1869 } |
| 1861 | 1870 |
| 1871 void PepperPluginDelegateImpl::TCPServerSocketListen( |
| 1872 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket, |
| 1873 uint32 temp_socket_id, |
| 1874 const PP_NetAddress_Private& addr, |
| 1875 int32_t backlog) { |
| 1876 uninitialized_tcp_server_sockets_.AddWithID(socket, temp_socket_id); |
| 1877 render_view_->Send( |
| 1878 new PpapiHostMsg_PPBTCPServerSocket_Listen( |
| 1879 render_view_->routing_id(), 0, temp_socket_id, addr, backlog)); |
| 1880 } |
| 1881 |
| 1882 void PepperPluginDelegateImpl::TCPServerSocketAccept(uint32 real_socket_id) { |
| 1883 DCHECK(tcp_server_sockets_.Lookup(real_socket_id)); |
| 1884 render_view_->Send(new PpapiHostMsg_PPBTCPServerSocket_Accept( |
| 1885 real_socket_id)); |
| 1886 } |
| 1887 |
| 1888 void PepperPluginDelegateImpl::TCPServerSocketStopListening( |
| 1889 uint32 real_socket_id, |
| 1890 uint32 temp_socket_id) { |
| 1891 if (real_socket_id == 0) { |
| 1892 if (uninitialized_tcp_server_sockets_.Lookup(temp_socket_id)) { |
| 1893 // Pending Listen request. |
| 1894 uninitialized_tcp_server_sockets_.Remove(temp_socket_id); |
| 1895 } |
| 1896 } else { |
| 1897 render_view_->Send( |
| 1898 new PpapiHostMsg_PPBTCPServerSocket_Destroy(real_socket_id)); |
| 1899 tcp_server_sockets_.Remove(real_socket_id); |
| 1900 } |
| 1901 } |
| 1902 |
| 1862 int32_t PepperPluginDelegateImpl::ShowContextMenu( | 1903 int32_t PepperPluginDelegateImpl::ShowContextMenu( |
| 1863 webkit::ppapi::PluginInstance* instance, | 1904 webkit::ppapi::PluginInstance* instance, |
| 1864 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 1905 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
| 1865 const gfx::Point& position) { | 1906 const gfx::Point& position) { |
| 1866 int32 render_widget_id = render_view_->routing_id(); | 1907 int32 render_widget_id = render_view_->routing_id(); |
| 1867 if (instance->FlashIsFullscreen(instance->pp_instance())) { | 1908 if (instance->FlashIsFullscreen(instance->pp_instance())) { |
| 1868 webkit::ppapi::FullscreenContainer* container = | 1909 webkit::ppapi::FullscreenContainer* container = |
| 1869 instance->fullscreen_container(); | 1910 instance->fullscreen_container(); |
| 1870 DCHECK(container); | 1911 DCHECK(container); |
| 1871 render_widget_id = | 1912 render_widget_id = |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK, | 2144 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK, |
| 2104 OnTCPSocketConnectACK) | 2145 OnTCPSocketConnectACK) |
| 2105 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, | 2146 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, |
| 2106 OnTCPSocketSSLHandshakeACK) | 2147 OnTCPSocketSSLHandshakeACK) |
| 2107 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK) | 2148 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK) |
| 2108 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK) | 2149 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK) |
| 2109 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK) | 2150 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK) |
| 2110 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_RecvFromACK, | 2151 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_RecvFromACK, |
| 2111 OnUDPSocketRecvFromACK) | 2152 OnUDPSocketRecvFromACK) |
| 2112 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, OnUDPSocketSendToACK) | 2153 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, OnUDPSocketSendToACK) |
| 2154 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_ListenACK, |
| 2155 OnTCPServerSocketListenACK) |
| 2156 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_AcceptACK, |
| 2157 OnTCPServerSocketAcceptACK) |
| 2113 IPC_MESSAGE_UNHANDLED(handled = false) | 2158 IPC_MESSAGE_UNHANDLED(handled = false) |
| 2114 IPC_END_MESSAGE_MAP() | 2159 IPC_END_MESSAGE_MAP() |
| 2115 return handled; | 2160 return handled; |
| 2116 } | 2161 } |
| 2117 | 2162 |
| 2118 void PepperPluginDelegateImpl::OnDestruct() { | 2163 void PepperPluginDelegateImpl::OnDestruct() { |
| 2119 // Nothing to do here. Default implementation in RenderViewObserver does | 2164 // Nothing to do here. Default implementation in RenderViewObserver does |
| 2120 // 'delete this' but it's not suitable for PepperPluginDelegateImpl because | 2165 // 'delete this' but it's not suitable for PepperPluginDelegateImpl because |
| 2121 // it's non-pointer member in RenderViewImpl. | 2166 // it's non-pointer member in RenderViewImpl. |
| 2122 } | 2167 } |
| 2123 | 2168 |
| 2124 void PepperPluginDelegateImpl::OnTCPSocketConnectACK( | 2169 void PepperPluginDelegateImpl::OnTCPSocketConnectACK( |
| 2125 uint32 plugin_dispatcher_id, | 2170 uint32 plugin_dispatcher_id, |
| 2126 uint32 socket_id, | 2171 uint32 socket_id, |
| 2127 bool succeeded, | 2172 bool succeeded, |
| 2128 const PP_NetAddress_Private& local_addr, | 2173 const PP_NetAddress_Private& local_addr, |
| 2129 const PP_NetAddress_Private& remote_addr) { | 2174 const PP_NetAddress_Private& remote_addr) { |
| 2130 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = | 2175 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = |
| 2131 tcp_sockets_.Lookup(socket_id); | 2176 tcp_sockets_.Lookup(socket_id); |
| 2132 if (socket) | 2177 if (socket) |
| 2133 socket->OnConnectCompleted(succeeded, local_addr, remote_addr); | 2178 socket->OnConnectCompleted(succeeded, local_addr, remote_addr); |
| 2179 if (!succeeded) |
| 2180 tcp_sockets_.Remove(socket_id); |
| 2134 } | 2181 } |
| 2135 | 2182 |
| 2136 void PepperPluginDelegateImpl::OnTCPSocketSSLHandshakeACK( | 2183 void PepperPluginDelegateImpl::OnTCPSocketSSLHandshakeACK( |
| 2137 uint32 plugin_dispatcher_id, | 2184 uint32 plugin_dispatcher_id, |
| 2138 uint32 socket_id, | 2185 uint32 socket_id, |
| 2139 bool succeeded) { | 2186 bool succeeded) { |
| 2140 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = | 2187 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = |
| 2141 tcp_sockets_.Lookup(socket_id); | 2188 tcp_sockets_.Lookup(socket_id); |
| 2142 if (socket) | 2189 if (socket) |
| 2143 socket->OnSSLHandshakeCompleted(succeeded); | 2190 socket->OnSSLHandshakeCompleted(succeeded); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2165 | 2212 |
| 2166 void PepperPluginDelegateImpl::OnUDPSocketBindACK( | 2213 void PepperPluginDelegateImpl::OnUDPSocketBindACK( |
| 2167 uint32 plugin_dispatcher_id, | 2214 uint32 plugin_dispatcher_id, |
| 2168 uint32 socket_id, | 2215 uint32 socket_id, |
| 2169 bool succeeded, | 2216 bool succeeded, |
| 2170 const PP_NetAddress_Private& addr) { | 2217 const PP_NetAddress_Private& addr) { |
| 2171 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2218 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
| 2172 udp_sockets_.Lookup(socket_id); | 2219 udp_sockets_.Lookup(socket_id); |
| 2173 if (socket) | 2220 if (socket) |
| 2174 socket->OnBindCompleted(succeeded, addr); | 2221 socket->OnBindCompleted(succeeded, addr); |
| 2222 if (!succeeded) |
| 2223 udp_sockets_.Remove(socket_id); |
| 2175 } | 2224 } |
| 2176 | 2225 |
| 2177 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( | 2226 void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK( |
| 2178 uint32 plugin_dispatcher_id, | 2227 uint32 plugin_dispatcher_id, |
| 2179 uint32 socket_id, | 2228 uint32 socket_id, |
| 2180 bool succeeded, | 2229 bool succeeded, |
| 2181 const std::string& data, | 2230 const std::string& data, |
| 2182 const PP_NetAddress_Private& remote_addr) { | 2231 const PP_NetAddress_Private& remote_addr) { |
| 2183 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2232 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
| 2184 udp_sockets_.Lookup(socket_id); | 2233 udp_sockets_.Lookup(socket_id); |
| 2185 if (socket) | 2234 if (socket) |
| 2186 socket->OnRecvFromCompleted(succeeded, data, remote_addr); | 2235 socket->OnRecvFromCompleted(succeeded, data, remote_addr); |
| 2187 } | 2236 } |
| 2188 | 2237 |
| 2189 void PepperPluginDelegateImpl::OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, | 2238 void PepperPluginDelegateImpl::OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, |
| 2190 uint32 socket_id, | 2239 uint32 socket_id, |
| 2191 bool succeeded, | 2240 bool succeeded, |
| 2192 int32_t bytes_written) { | 2241 int32_t bytes_written) { |
| 2193 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = | 2242 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket = |
| 2194 udp_sockets_.Lookup(socket_id); | 2243 udp_sockets_.Lookup(socket_id); |
| 2195 if (socket) | 2244 if (socket) |
| 2196 socket->OnSendToCompleted(succeeded, bytes_written); | 2245 socket->OnSendToCompleted(succeeded, bytes_written); |
| 2197 } | 2246 } |
| 2198 | 2247 |
| 2248 void PepperPluginDelegateImpl::OnTCPServerSocketListenACK( |
| 2249 uint32 plugin_dispatcher_id, |
| 2250 uint32 real_socket_id, |
| 2251 uint32 temp_socket_id, |
| 2252 int32_t status) { |
| 2253 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket = |
| 2254 uninitialized_tcp_server_sockets_.Lookup(temp_socket_id); |
| 2255 if (socket == NULL) { |
| 2256 // StopListening was called before completion of Listen. |
| 2257 render_view_->Send( |
| 2258 new PpapiHostMsg_PPBTCPServerSocket_Destroy(real_socket_id)); |
| 2259 } else { |
| 2260 uninitialized_tcp_server_sockets_.Remove(temp_socket_id); |
| 2261 |
| 2262 if (status == PP_OK) |
| 2263 tcp_server_sockets_.AddWithID(socket, real_socket_id); |
| 2264 socket->OnListenCompleted(real_socket_id, status); |
| 2265 } |
| 2266 } |
| 2267 |
| 2268 void PepperPluginDelegateImpl::OnTCPServerSocketAcceptACK( |
| 2269 uint32 plugin_dispatcher_id, |
| 2270 uint32 real_server_socket_id, |
| 2271 uint32 accepted_socket_id, |
| 2272 const PP_NetAddress_Private& local_addr, |
| 2273 const PP_NetAddress_Private& remote_addr) { |
| 2274 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket = |
| 2275 tcp_server_sockets_.Lookup(real_server_socket_id); |
| 2276 if (socket) { |
| 2277 bool succeeded = accepted_socket_id != 0; |
| 2278 socket->OnAcceptCompleted(succeeded, |
| 2279 accepted_socket_id, |
| 2280 local_addr, |
| 2281 remote_addr); |
| 2282 } |
| 2283 } |
| 2284 |
| 2199 int PepperPluginDelegateImpl::GetRoutingId() const { | 2285 int PepperPluginDelegateImpl::GetRoutingId() const { |
| 2200 return render_view_->routing_id(); | 2286 return render_view_->routing_id(); |
| 2201 } | 2287 } |
| 2202 | 2288 |
| 2203 int PepperPluginDelegateImpl::OpenDevice(PP_DeviceType_Dev type, | 2289 int PepperPluginDelegateImpl::OpenDevice(PP_DeviceType_Dev type, |
| 2204 const std::string& device_id, | 2290 const std::string& device_id, |
| 2205 const OpenDeviceCallback& callback) { | 2291 const OpenDeviceCallback& callback) { |
| 2206 int request_id = | 2292 int request_id = |
| 2207 device_enumeration_event_handler_->RegisterOpenDeviceCallback(callback); | 2293 device_enumeration_event_handler_->RegisterOpenDeviceCallback(callback); |
| 2208 | 2294 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2275 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( | 2361 void PepperPluginDelegateImpl::UnSetAndDeleteLockTargetAdapter( |
| 2276 webkit::ppapi::PluginInstance* instance) { | 2362 webkit::ppapi::PluginInstance* instance) { |
| 2277 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); | 2363 LockTargetMap::iterator it = mouse_lock_instances_.find(instance); |
| 2278 if (it != mouse_lock_instances_.end()) { | 2364 if (it != mouse_lock_instances_.end()) { |
| 2279 MouseLockDispatcher::LockTarget* target = it->second; | 2365 MouseLockDispatcher::LockTarget* target = it->second; |
| 2280 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); | 2366 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); |
| 2281 delete target; | 2367 delete target; |
| 2282 mouse_lock_instances_.erase(it); | 2368 mouse_lock_instances_.erase(it); |
| 2283 } | 2369 } |
| 2284 } | 2370 } |
| OLD | NEW |