| 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 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 Loading... |
| 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 PP_Var MakeResourcePPVar(PP_Instance instance, |
| 59 const IPC::Message& creation_message, |
| 60 int pending_renderer_id, |
| 61 int pending_browser_id) OVERRIDE; |
| 58 virtual ppapi::ResourceVar* MakeResourceVar(PP_Resource pp_resource) OVERRIDE; | 62 virtual ppapi::ResourceVar* MakeResourceVar(PP_Resource pp_resource) OVERRIDE; |
| 59 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE; | 63 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE; |
| 60 | 64 |
| 61 virtual int TrackSharedMemoryHandle(PP_Instance instance, | 65 virtual int TrackSharedMemoryHandle(PP_Instance instance, |
| 62 base::SharedMemoryHandle file, | 66 base::SharedMemoryHandle file, |
| 63 uint32 size_in_bytes) OVERRIDE; | 67 uint32 size_in_bytes) OVERRIDE; |
| 64 virtual bool StopTrackingSharedMemoryHandle(int id, | 68 virtual bool StopTrackingSharedMemoryHandle(int id, |
| 65 PP_Instance instance, | 69 PP_Instance instance, |
| 66 base::SharedMemoryHandle* handle, | 70 base::SharedMemoryHandle* handle, |
| 67 uint32* size_in_bytes) OVERRIDE; | 71 uint32* size_in_bytes) OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 typedef std::map<int, SharedMemoryMapEntry> SharedMemoryMap; | 103 typedef std::map<int, SharedMemoryMapEntry> SharedMemoryMap; |
| 100 SharedMemoryMap shared_memory_map_; | 104 SharedMemoryMap shared_memory_map_; |
| 101 uint32_t last_shared_memory_map_id_; | 105 uint32_t last_shared_memory_map_id_; |
| 102 | 106 |
| 103 DISALLOW_COPY_AND_ASSIGN(HostVarTracker); | 107 DISALLOW_COPY_AND_ASSIGN(HostVarTracker); |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 } // namespace content | 110 } // namespace content |
| 107 | 111 |
| 108 #endif // CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_ | 112 #endif // CONTENT_RENDERER_PEPPER_HOST_VAR_TRACKER_H_ |
| OLD | NEW |