| 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 <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_AcceptACK, | 1401 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_AcceptACK, |
| 1402 OnTCPServerSocketAcceptACK) | 1402 OnTCPServerSocketAcceptACK) |
| 1403 IPC_MESSAGE_HANDLER(PpapiMsg_PPBHostResolver_ResolveACK, | 1403 IPC_MESSAGE_HANDLER(PpapiMsg_PPBHostResolver_ResolveACK, |
| 1404 OnHostResolverResolveACK) | 1404 OnHostResolverResolveACK) |
| 1405 IPC_MESSAGE_UNHANDLED(handled = false) | 1405 IPC_MESSAGE_UNHANDLED(handled = false) |
| 1406 IPC_END_MESSAGE_MAP() | 1406 IPC_END_MESSAGE_MAP() |
| 1407 return handled; | 1407 return handled; |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 void PepperPluginDelegateImpl::OnDestruct() { | 1410 void PepperPluginDelegateImpl::OnDestruct() { |
| 1411 // Nothing to do here. Default implementation in RenderViewObserver does | 1411 // This method may be called as part of an abbreviated shutdown by |
| 1412 // 'delete this' but it's not suitable for PepperPluginDelegateImpl because | 1412 // RenderViewImpl::OnShouldClose() as well as part of a full cleanup. |
| 1413 // it's non-pointer member in RenderViewImpl. | 1413 // Default implementation in RenderViewObserver does 'delete this' but it's |
| 1414 // not suitable for PepperPluginDelegateImpl because it's non-pointer member |
| 1415 // in RenderViewImpl. |
| 1416 while (active_instances_.begin() != active_instances_.end()) { |
| 1417 webkit::ppapi::PluginInstance* instance = *active_instances_.begin(); |
| 1418 instance->Delete(); |
| 1419 active_instances_.erase(instance); |
| 1420 } |
| 1414 } | 1421 } |
| 1415 | 1422 |
| 1416 void PepperPluginDelegateImpl::OnTCPSocketConnectACK( | 1423 void PepperPluginDelegateImpl::OnTCPSocketConnectACK( |
| 1417 uint32 plugin_dispatcher_id, | 1424 uint32 plugin_dispatcher_id, |
| 1418 uint32 socket_id, | 1425 uint32 socket_id, |
| 1419 bool succeeded, | 1426 bool succeeded, |
| 1420 const PP_NetAddress_Private& local_addr, | 1427 const PP_NetAddress_Private& local_addr, |
| 1421 const PP_NetAddress_Private& remote_addr) { | 1428 const PP_NetAddress_Private& remote_addr) { |
| 1422 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = | 1429 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket = |
| 1423 tcp_sockets_.Lookup(socket_id); | 1430 tcp_sockets_.Lookup(socket_id); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 mouse_lock_instances_.erase(it); | 1639 mouse_lock_instances_.erase(it); |
| 1633 } | 1640 } |
| 1634 } | 1641 } |
| 1635 | 1642 |
| 1636 webkit_glue::ClipboardClient* | 1643 webkit_glue::ClipboardClient* |
| 1637 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1644 PepperPluginDelegateImpl::CreateClipboardClient() const { |
| 1638 return new RendererClipboardClient; | 1645 return new RendererClipboardClient; |
| 1639 } | 1646 } |
| 1640 | 1647 |
| 1641 } // namespace content | 1648 } // namespace content |
| OLD | NEW |