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

Side by Side Diff: content/renderer/pepper/host_var_tracker.h

Issue 23809016: [PPAPI] ResourceVar now reference counts its PP_Resource in the plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Windows compile. Created 7 years, 3 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
OLDNEW
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 CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_
6 #define CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_ 6 #define CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // given NPObject for the given instance. See AddNPObjectVar above. 48 // given NPObject for the given instance. See AddNPObjectVar above.
49 ppapi::NPObjectVar* NPObjectVarForNPObject(PP_Instance instance, 49 ppapi::NPObjectVar* NPObjectVarForNPObject(PP_Instance instance,
50 NPObject* np_object); 50 NPObject* np_object);
51 51
52 // Returns the number of NPObjectVar's associated with the given instance. 52 // Returns the number of NPObjectVar's associated with the given instance.
53 // Returns 0 if the instance isn't known. 53 // Returns 0 if the instance isn't known.
54 CONTENT_EXPORT int GetLiveNPObjectVarsForInstance( 54 CONTENT_EXPORT int GetLiveNPObjectVarsForInstance(
55 PP_Instance instance) const; 55 PP_Instance instance) const;
56 56
57 // VarTracker public implementation. 57 // VarTracker public implementation.
58 virtual ppapi::ResourceVar* MakeResourceVar(PP_Resource pp_resource) OVERRIDE;
58 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE; 59 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE;
59 60
60 virtual int TrackSharedMemoryHandle(PP_Instance instance, 61 virtual int TrackSharedMemoryHandle(PP_Instance instance,
61 base::SharedMemoryHandle file, 62 base::SharedMemoryHandle file,
62 uint32 size_in_bytes) OVERRIDE; 63 uint32 size_in_bytes) OVERRIDE;
63 virtual bool StopTrackingSharedMemoryHandle(int id, 64 virtual bool StopTrackingSharedMemoryHandle(int id,
64 PP_Instance instance, 65 PP_Instance instance,
65 base::SharedMemoryHandle* handle, 66 base::SharedMemoryHandle* handle,
66 uint32* size_in_bytes) OVERRIDE; 67 uint32* size_in_bytes) OVERRIDE;
67 68
(...skipping 30 matching lines...) Expand all
98 typedef std::map<int, SharedMemoryMapEntry> SharedMemoryMap; 99 typedef std::map<int, SharedMemoryMapEntry> SharedMemoryMap;
99 SharedMemoryMap shared_memory_map_; 100 SharedMemoryMap shared_memory_map_;
100 uint32_t last_shared_memory_map_id_; 101 uint32_t last_shared_memory_map_id_;
101 102
102 DISALLOW_COPY_AND_ASSIGN(HostVarTracker); 103 DISALLOW_COPY_AND_ASSIGN(HostVarTracker);
103 }; 104 };
104 105
105 } // namespace content 106 } // namespace content
106 107
107 #endif // CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_ 108 #endif // CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/host_resource_var.cc ('k') | content/renderer/pepper/host_var_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698