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

Side by Side Diff: ppapi/proxy/ppp_instance_proxy.cc

Issue 10542150: Actually free plugin implement vars when running out of process when the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppp_class_proxy.cc ('k') | ppapi/proxy/proxy_object_var.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/ppp_instance_proxy.h" 5 #include "ppapi/proxy/ppp_instance_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/ppb_core.h" 10 #include "ppapi/c/ppb_core.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 DCHECK(combined_interface_.get()); 214 DCHECK(combined_interface_.get());
215 *result = combined_interface_->DidCreate(instance, 215 *result = combined_interface_->DidCreate(instance,
216 static_cast<uint32_t>(argn.size()), 216 static_cast<uint32_t>(argn.size()),
217 &argn_array[0], &argv_array[0]); 217 &argn_array[0], &argv_array[0]);
218 } 218 }
219 219
220 void PPP_Instance_Proxy::OnPluginMsgDidDestroy(PP_Instance instance) { 220 void PPP_Instance_Proxy::OnPluginMsgDidDestroy(PP_Instance instance) {
221 combined_interface_->DidDestroy(instance); 221 combined_interface_->DidDestroy(instance);
222 PpapiGlobals::Get()->GetResourceTracker()->DidDeleteInstance(instance); 222
223 PpapiGlobals* globals = PpapiGlobals::Get();
224 globals->GetResourceTracker()->DidDeleteInstance(instance);
225 globals->GetVarTracker()->DidDeleteInstance(instance);
226
223 static_cast<PluginDispatcher*>(dispatcher())->DidDestroyInstance(instance); 227 static_cast<PluginDispatcher*>(dispatcher())->DidDestroyInstance(instance);
224 } 228 }
225 229
226 void PPP_Instance_Proxy::OnPluginMsgDidChangeView( 230 void PPP_Instance_Proxy::OnPluginMsgDidChangeView(
227 PP_Instance instance, 231 PP_Instance instance,
228 const ViewData& new_data, 232 const ViewData& new_data,
229 PP_Bool flash_fullscreen) { 233 PP_Bool flash_fullscreen) {
230 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 234 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
231 if (!dispatcher) 235 if (!dispatcher)
232 return; 236 return;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // with. The plugin will normally take an additional reference which will keep 268 // with. The plugin will normally take an additional reference which will keep
265 // the resource alive in the plugin (and the one reference in the renderer 269 // the resource alive in the plugin (and the one reference in the renderer
266 // representing all plugin references). 270 // representing all plugin references).
267 // Once all references at the plugin side are released, the renderer side will 271 // Once all references at the plugin side are released, the renderer side will
268 // be notified and release the reference added in HandleDocumentLoad() above. 272 // be notified and release the reference added in HandleDocumentLoad() above.
269 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(plugin_loader); 273 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(plugin_loader);
270 } 274 }
271 275
272 } // namespace proxy 276 } // namespace proxy
273 } // namespace ppapi 277 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_class_proxy.cc ('k') | ppapi/proxy/proxy_object_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698