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 WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 public ::ppapi::ResourceTracker { | 47 public ::ppapi::ResourceTracker { |
48 public: | 48 public: |
49 // Returns the pointer to the singleton object. | 49 // Returns the pointer to the singleton object. |
50 static ResourceTracker* Get(); | 50 static ResourceTracker* Get(); |
51 | 51 |
52 // PP_Resources -------------------------------------------------------------- | 52 // PP_Resources -------------------------------------------------------------- |
53 | 53 |
54 // TrackerBase. | 54 // TrackerBase. |
55 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( | 55 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( |
56 PP_Instance pp_instance, | 56 PP_Instance pp_instance, |
57 pp::proxy::InterfaceID id) OVERRIDE; | 57 ::ppapi::proxy::InterfaceID id) OVERRIDE; |
58 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; | 58 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; |
59 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; | 59 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; |
60 | 60 |
61 // PP_Vars ------------------------------------------------------------------- | 61 // PP_Vars ------------------------------------------------------------------- |
62 | 62 |
63 // Tracks all live NPObjectVar. This is so we can map between instance + | 63 // Tracks all live NPObjectVar. This is so we can map between instance + |
64 // NPObject and get the NPObjectVar corresponding to it. This Add/Remove | 64 // NPObject and get the NPObjectVar corresponding to it. This Add/Remove |
65 // function is called by the NPObjectVar when it is created and | 65 // function is called by the NPObjectVar when it is created and |
66 // destroyed. | 66 // destroyed. |
67 void AddNPObjectVar(::ppapi::NPObjectVar* object_var); | 67 void AddNPObjectVar(::ppapi::NPObjectVar* object_var); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 typedef std::map<PP_Module, PluginModule*> ModuleMap; | 185 typedef std::map<PP_Module, PluginModule*> ModuleMap; |
186 ModuleMap module_map_; | 186 ModuleMap module_map_; |
187 | 187 |
188 DISALLOW_COPY_AND_ASSIGN(ResourceTracker); | 188 DISALLOW_COPY_AND_ASSIGN(ResourceTracker); |
189 }; | 189 }; |
190 | 190 |
191 } // namespace ppapi | 191 } // namespace ppapi |
192 } // namespace webkit | 192 } // namespace webkit |
193 | 193 |
194 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 194 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
OLD | NEW |