| OLD | NEW |
| 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 #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 "base/memory/shared_memory.h" | 14 #include "base/memory/shared_memory.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
| 17 #include "ppapi/proxy/ppapi_proxy_export.h" | 17 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 18 #include "ppapi/shared_impl/var_tracker.h" | 18 #include "ppapi/shared_impl/var_tracker.h" |
| 19 | 19 |
| 20 namespace base { |
| 20 template<typename T> struct DefaultSingletonTraits; | 21 template<typename T> struct DefaultSingletonTraits; |
| 22 } |
| 23 |
| 21 struct PPP_Class_Deprecated; | 24 struct PPP_Class_Deprecated; |
| 22 | 25 |
| 23 namespace ppapi { | 26 namespace ppapi { |
| 24 | 27 |
| 25 class ProxyObjectVar; | 28 class ProxyObjectVar; |
| 26 | 29 |
| 27 namespace proxy { | 30 namespace proxy { |
| 28 | 31 |
| 29 class PluginDispatcher; | 32 class PluginDispatcher; |
| 30 | 33 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 int32 AddVarInternal(Var* var, AddVarRefMode mode) override; | 102 int32 AddVarInternal(Var* var, AddVarRefMode mode) override; |
| 100 void TrackedObjectGettingOneRef(VarMap::const_iterator iter) override; | 103 void TrackedObjectGettingOneRef(VarMap::const_iterator iter) override; |
| 101 void ObjectGettingZeroRef(VarMap::iterator iter) override; | 104 void ObjectGettingZeroRef(VarMap::iterator iter) override; |
| 102 bool DeleteObjectInfoIfNecessary(VarMap::iterator iter) override; | 105 bool DeleteObjectInfoIfNecessary(VarMap::iterator iter) override; |
| 103 ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) override; | 106 ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) override; |
| 104 ArrayBufferVar* CreateShmArrayBuffer( | 107 ArrayBufferVar* CreateShmArrayBuffer( |
| 105 uint32 size_in_bytes, | 108 uint32 size_in_bytes, |
| 106 base::SharedMemoryHandle handle) override; | 109 base::SharedMemoryHandle handle) override; |
| 107 | 110 |
| 108 private: | 111 private: |
| 109 friend struct DefaultSingletonTraits<PluginVarTracker>; | 112 friend struct base::DefaultSingletonTraits<PluginVarTracker>; |
| 110 friend class PluginProxyTestHarness; | 113 friend class PluginProxyTestHarness; |
| 111 | 114 |
| 112 // Represents a var as received from the host. | 115 // Represents a var as received from the host. |
| 113 struct HostVar { | 116 struct HostVar { |
| 114 HostVar(PluginDispatcher* d, int32 i); | 117 HostVar(PluginDispatcher* d, int32 i); |
| 115 | 118 |
| 116 bool operator<(const HostVar& other) const; | 119 bool operator<(const HostVar& other) const; |
| 117 | 120 |
| 118 // The dispatcher that sent us this object. This is used so we know how to | 121 // The dispatcher that sent us this object. This is used so we know how to |
| 119 // send back requests on this object. | 122 // send back requests on this object. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 UserDataToPluginImplementedVarMap; | 204 UserDataToPluginImplementedVarMap; |
| 202 UserDataToPluginImplementedVarMap user_data_to_plugin_; | 205 UserDataToPluginImplementedVarMap user_data_to_plugin_; |
| 203 | 206 |
| 204 DISALLOW_COPY_AND_ASSIGN(PluginVarTracker); | 207 DISALLOW_COPY_AND_ASSIGN(PluginVarTracker); |
| 205 }; | 208 }; |
| 206 | 209 |
| 207 } // namespace proxy | 210 } // namespace proxy |
| 208 } // namespace ppapi | 211 } // namespace ppapi |
| 209 | 212 |
| 210 #endif // PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ | 213 #endif // PPAPI_PROXY_PLUGIN_VAR_TRACKER_H_ |
| OLD | NEW |