| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/proxy/plugin_resource_tracker.h" | 5 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
| 10 #include "ppapi/proxy/plugin_globals.h" | 10 #include "ppapi/proxy/plugin_globals.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 host_resource_map_.end()); | 58 host_resource_map_.end()); |
| 59 host_resource_map_.erase(object->host_resource()); | 59 host_resource_map_.erase(object->host_resource()); |
| 60 | 60 |
| 61 PluginDispatcher* dispatcher = | 61 PluginDispatcher* dispatcher = |
| 62 PluginDispatcher::GetForInstance(object->pp_instance()); | 62 PluginDispatcher::GetForInstance(object->pp_instance()); |
| 63 if (dispatcher) { | 63 if (dispatcher) { |
| 64 // The dispatcher can be NULL if the plugin held on to a resource after | 64 // The dispatcher can be NULL if the plugin held on to a resource after |
| 65 // the instance was destroyed. In that case the browser-side resource has | 65 // the instance was destroyed. In that case the browser-side resource has |
| 66 // already been freed correctly on the browser side. | 66 // already been freed correctly on the browser side. |
| 67 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( | 67 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( |
| 68 INTERFACE_ID_PPB_CORE, object->host_resource())); | 68 API_ID_PPB_CORE, object->host_resource())); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace proxy | 73 } // namespace proxy |
| 74 } // namespace ppapi | 74 } // namespace ppapi |
| OLD | NEW |