| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "webkit/plugins/ppapi/host_resource_tracker.h" | |
| 6 | |
| 7 #include "ppapi/shared_impl/resource.h" | |
| 8 #include "webkit/plugins/ppapi/callbacks.h" | |
| 9 #include "webkit/plugins/ppapi/plugin_module.h" | |
| 10 #include "webkit/plugins/ppapi/resource_helper.h" | |
| 11 | |
| 12 namespace webkit { | |
| 13 namespace ppapi { | |
| 14 | |
| 15 HostResourceTracker::HostResourceTracker() { | |
| 16 } | |
| 17 | |
| 18 HostResourceTracker::~HostResourceTracker() { | |
| 19 } | |
| 20 | |
| 21 void HostResourceTracker::LastPluginRefWasDeleted(::ppapi::Resource* object) { | |
| 22 ::ppapi::ResourceTracker::LastPluginRefWasDeleted(object); | |
| 23 | |
| 24 // TODO(brettw) this should be removed when we have the callback tracker | |
| 25 // moved to the shared_impl. This will allow the logic to post aborts for | |
| 26 // any callbacks directly in the Resource::LastPluginRefWasDeleted function | |
| 27 // and we can remove this function altogether. | |
| 28 PluginModule* plugin_module = ResourceHelper::GetPluginModule(object); | |
| 29 if (plugin_module) { | |
| 30 plugin_module->GetCallbackTracker()->PostAbortForResource( | |
| 31 object->pp_resource()); | |
| 32 } | |
| 33 } | |
| 34 | |
| 35 } // namespace ppapi | |
| 36 } // namespace webkit | |
| OLD | NEW |