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_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_resource_tracker.h" | 9 #include "ppapi/proxy/plugin_resource_tracker.h" |
10 #include "ppapi/proxy/plugin_var_tracker.h" | 10 #include "ppapi/proxy/plugin_var_tracker.h" |
11 #include "ppapi/shared_impl/var.h" | 11 #include "ppapi/shared_impl/var.h" |
12 | 12 |
13 using ppapi::StringVar; | 13 namespace ppapi { |
14 | |
15 namespace pp { | |
16 namespace proxy { | 14 namespace proxy { |
17 | 15 |
18 PluginVarSerializationRules::PluginVarSerializationRules() | 16 PluginVarSerializationRules::PluginVarSerializationRules() |
19 : var_tracker_(&PluginResourceTracker::GetInstance()->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, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 var_tracker_->ReleaseHostObject( | 135 var_tracker_->ReleaseHostObject( |
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 pp | 145 } // namespace ppapi |
OLD | NEW |