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

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

Issue 8342016: Revert 106142 - Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/plugin_resource_tracker.cc ('k') | ppapi/proxy/ppapi_proxy_test.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) 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_var_serialization_rules.h" 5 #include "ppapi/proxy/plugin_var_serialization_rules.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/plugin_globals.h"
10 #include "ppapi/proxy/plugin_resource_tracker.h" 9 #include "ppapi/proxy/plugin_resource_tracker.h"
11 #include "ppapi/proxy/plugin_var_tracker.h" 10 #include "ppapi/proxy/plugin_var_tracker.h"
12 #include "ppapi/shared_impl/ppapi_globals.h"
13 #include "ppapi/shared_impl/var.h" 11 #include "ppapi/shared_impl/var.h"
14 12
15 namespace ppapi { 13 namespace ppapi {
16 namespace proxy { 14 namespace proxy {
17 15
18 PluginVarSerializationRules::PluginVarSerializationRules() 16 PluginVarSerializationRules::PluginVarSerializationRules()
19 : var_tracker_(PluginGlobals::Get()->plugin_var_tracker()) { 17 : var_tracker_(&PluginResourceTracker::GetInstance()->var_tracker()) {
20 } 18 }
21 19
22 PluginVarSerializationRules::~PluginVarSerializationRules() { 20 PluginVarSerializationRules::~PluginVarSerializationRules() {
23 } 21 }
24 22
25 PP_Var PluginVarSerializationRules::SendCallerOwned(const PP_Var& var, 23 PP_Var PluginVarSerializationRules::SendCallerOwned(const PP_Var& var,
26 std::string* str_val) { 24 std::string* str_val) {
27 // Objects need special translations to get the IDs valid in the host. 25 // Objects need special translations to get the IDs valid in the host.
28 if (var.type == PP_VARTYPE_OBJECT) 26 if (var.type == PP_VARTYPE_OBJECT)
29 return var_tracker_->GetHostObject(var); 27 return var_tracker_->GetHostObject(var);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 static_cast<PluginDispatcher*>(dispatcher), var); 136 static_cast<PluginDispatcher*>(dispatcher), var);
139 } 137 }
140 } 138 }
141 139
142 void PluginVarSerializationRules::ReleaseObjectRef(const PP_Var& var) { 140 void PluginVarSerializationRules::ReleaseObjectRef(const PP_Var& var) {
143 var_tracker_->ReleaseVar(var); 141 var_tracker_->ReleaseVar(var);
144 } 142 }
145 143
146 } // namespace proxy 144 } // namespace proxy
147 } // namespace ppapi 145 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_resource_tracker.cc ('k') | ppapi/proxy/ppapi_proxy_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698