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

Side by Side Diff: ppapi/shared_impl/var_tracker.h

Issue 9373032: PPAPI: Proxy VarArrayBuffer for out-of-process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
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 PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 5 #ifndef PPAPI_SHARED_IMPL_VAR_TRACKER_H_
6 #define PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 6 #define PPAPI_SHARED_IMPL_VAR_TRACKER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Decreases the given Var ID's refcount, returning true on success, false if 54 // Decreases the given Var ID's refcount, returning true on success, false if
55 // the ID is invalid or if the refcount was already 0. The PP_Var version 55 // the ID is invalid or if the refcount was already 0. The PP_Var version
56 // returns true and does nothing for non-refcounted type vars. The var will 56 // returns true and does nothing for non-refcounted type vars. The var will
57 // be deleted if there are no more refs to it. 57 // be deleted if there are no more refs to it.
58 bool ReleaseVar(int32 var_id); 58 bool ReleaseVar(int32 var_id);
59 bool ReleaseVar(const PP_Var& var); 59 bool ReleaseVar(const PP_Var& var);
60 60
61 // Create a new array buffer of size |size_in_bytes|. Return a PP_Var that 61 // Create a new array buffer of size |size_in_bytes|. Return a PP_Var that
62 // that references it and has an initial reference-count of 1. 62 // that references it and has an initial reference-count of 1.
63 PP_Var MakeArrayBufferPPVar(uint32 size_in_bytes); 63 PP_Var MakeArrayBufferPPVar(uint32 size_in_bytes);
64 PP_Var MakeArrayBufferPPVar(uint32 size_in_bytes, const void* data);
brettw 2012/02/09 19:23:22 Can you provide documentation for this? I at first
64 65
65 // Return a vector containing all PP_Vars that are in the tracker. This is 66 // Return a vector containing all PP_Vars that are in the tracker. This is
66 // to help implement PPB_Testing_Dev.GetLiveVars and should generally not be 67 // to help implement PPB_Testing_Dev.GetLiveVars and should generally not be
67 // used in production code. The PP_Vars are returned in no particular order, 68 // used in production code. The PP_Vars are returned in no particular order,
68 // and their reference counts are unaffected. 69 // and their reference counts are unaffected.
69 std::vector<PP_Var> GetLiveVars(); 70 std::vector<PP_Var> GetLiveVars();
70 71
71 // Retrieves the internal reference counts for testing. Returns 0 if we 72 // Retrieves the internal reference counts for testing. Returns 0 if we
72 // know about the object but the corresponding value is 0, or -1 if the 73 // know about the object but the corresponding value is 0, or -1 if the
73 // given object ID isn't in our map. 74 // given object ID isn't in our map.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // implemented by the Host and Plugin tracker separately, so that it can be 152 // implemented by the Host and Plugin tracker separately, so that it can be
152 // a real WebKit ArrayBuffer on the host side. 153 // a real WebKit ArrayBuffer on the host side.
153 virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) = 0; 154 virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) = 0;
154 155
155 DISALLOW_COPY_AND_ASSIGN(VarTracker); 156 DISALLOW_COPY_AND_ASSIGN(VarTracker);
156 }; 157 };
157 158
158 } // namespace ppapi 159 } // namespace ppapi
159 160
160 #endif // PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 161 #endif // PPAPI_SHARED_IMPL_VAR_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698