| 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 #ifndef PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ | 6 #define PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
| 15 #include "ppapi/c/pp_var.h" | 15 #include "ppapi/c/pp_var.h" |
| 16 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 16 #include "ppapi/shared_impl/var_tracker.h" | 17 #include "ppapi/shared_impl/var_tracker.h" |
| 17 | 18 |
| 18 struct PPB_Var; | 19 struct PPB_Var; |
| 19 | 20 |
| 20 template<typename T> struct DefaultSingletonTraits; | 21 template<typename T> struct DefaultSingletonTraits; |
| 21 | 22 |
| 22 namespace ppapi { | 23 namespace ppapi { |
| 23 | 24 |
| 24 class ProxyObjectVar; | 25 class ProxyObjectVar; |
| 25 | 26 |
| 26 namespace proxy { | 27 namespace proxy { |
| 27 | 28 |
| 28 class PluginDispatcher; | 29 class PluginDispatcher; |
| 29 | 30 |
| 30 // Tracks live strings and objects in the plugin process. | 31 // Tracks live strings and objects in the plugin process. |
| 31 class PluginVarTracker : public VarTracker { | 32 class PPAPI_PROXY_EXPORT PluginVarTracker : public VarTracker { |
| 32 public: | 33 public: |
| 33 PluginVarTracker(); | 34 PluginVarTracker(); |
| 34 ~PluginVarTracker(); | 35 ~PluginVarTracker(); |
| 35 | 36 |
| 36 // Manages tracking for receiving a VARTYPE_OBJECT from the remote side | 37 // Manages tracking for receiving a VARTYPE_OBJECT from the remote side |
| 37 // (either the plugin or the renderer) that has already had its reference | 38 // (either the plugin or the renderer) that has already had its reference |
| 38 // count incremented on behalf of the caller. | 39 // count incremented on behalf of the caller. |
| 39 PP_Var ReceiveObjectPassRef(const PP_Var& var, PluginDispatcher* dispatcher); | 40 PP_Var ReceiveObjectPassRef(const PP_Var& var, PluginDispatcher* dispatcher); |
| 40 | 41 |
| 41 // See the comment in var_tracker.h for more about what a tracked object is. | 42 // See the comment in var_tracker.h for more about what a tracked object is. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 typedef std::map<HostVar, int32> HostVarToPluginVarMap; | 113 typedef std::map<HostVar, int32> HostVarToPluginVarMap; |
| 113 HostVarToPluginVarMap host_var_to_plugin_var_; | 114 HostVarToPluginVarMap host_var_to_plugin_var_; |
| 114 | 115 |
| 115 DISALLOW_COPY_AND_ASSIGN(PluginVarTracker); | 116 DISALLOW_COPY_AND_ASSIGN(PluginVarTracker); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace proxy | 119 } // namespace proxy |
| 119 } // namespace ppapi | 120 } // namespace ppapi |
| 120 | 121 |
| 121 #endif // PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ | 122 #endif // PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ |
| OLD | NEW |