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

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

Issue 7578001: Unify var tracking between webkit and the proxy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/ppb_var_proxy.cc ('k') | ppapi/proxy/ppp_messaging_proxy_test.cc » ('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) 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/ppp_messaging_proxy.h" 5 #include "ppapi/proxy/ppp_messaging_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/ppp_messaging.h" 9 #include "ppapi/c/ppp_messaging.h"
10 #include "ppapi/proxy/host_dispatcher.h" 10 #include "ppapi/proxy/host_dispatcher.h"
11 #include "ppapi/proxy/plugin_resource_tracker.h"
11 #include "ppapi/proxy/plugin_var_tracker.h" 12 #include "ppapi/proxy/plugin_var_tracker.h"
12 #include "ppapi/proxy/ppapi_messages.h" 13 #include "ppapi/proxy/ppapi_messages.h"
13 #include "ppapi/proxy/serialized_var.h" 14 #include "ppapi/proxy/serialized_var.h"
14 15
15 namespace pp { 16 namespace pp {
16 namespace proxy { 17 namespace proxy {
17 18
18 namespace { 19 namespace {
19 20
20 void HandleMessage(PP_Instance instance, PP_Var message_data) { 21 void HandleMessage(PP_Instance instance, PP_Var message_data) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 IPC_MESSAGE_UNHANDLED(handled = false) 72 IPC_MESSAGE_UNHANDLED(handled = false)
72 IPC_END_MESSAGE_MAP() 73 IPC_END_MESSAGE_MAP()
73 return handled; 74 return handled;
74 } 75 }
75 76
76 void PPP_Messaging_Proxy::OnMsgHandleMessage( 77 void PPP_Messaging_Proxy::OnMsgHandleMessage(
77 PP_Instance instance, SerializedVarReceiveInput message_data) { 78 PP_Instance instance, SerializedVarReceiveInput message_data) {
78 PP_Var received_var(message_data.Get(dispatcher())); 79 PP_Var received_var(message_data.Get(dispatcher()));
79 // SerializedVarReceiveInput will decrement the reference count, but we want 80 // SerializedVarReceiveInput will decrement the reference count, but we want
80 // to give the recipient a reference. 81 // to give the recipient a reference.
81 PluginVarTracker::GetInstance()->AddRef(received_var); 82 PluginResourceTracker::GetInstance()->var_tracker().AddRefVar(received_var);
82 ppp_messaging_target()->HandleMessage(instance, received_var); 83 ppp_messaging_target()->HandleMessage(instance, received_var);
83 } 84 }
84 85
85 } // namespace proxy 86 } // namespace proxy
86 } // namespace pp 87 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_var_proxy.cc ('k') | ppapi/proxy/ppp_messaging_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698