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

Unified Diff: ppapi/cpp/var_array_buffer.h

Issue 13985026: Add a default constructor for VarArrayBuffer, so that it can be used by ext::DictField. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/extensions/from_var_converter.h ('k') | ppapi/cpp/var_array_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/var_array_buffer.h
diff --git a/ppapi/cpp/var_array_buffer.h b/ppapi/cpp/var_array_buffer.h
index fd2b05b04cf0ed4e43cfd9d4cbdad551180e8e51..7d1f9ad48c41edba56739c9d37d2a72046cafe91 100644
--- a/ppapi/cpp/var_array_buffer.h
+++ b/ppapi/cpp/var_array_buffer.h
@@ -19,6 +19,10 @@ namespace pp {
/// <code>HandleMessage</code> functions of <code>Instance</code>.
class VarArrayBuffer : public Var {
public:
+ /// The default constructor constructs a <code>VarArrayBuffer</code> which is
+ /// 0 byte long.
+ VarArrayBuffer();
+
/// Construct a <code>VarArrayBuffer</code> given a var for which
/// is_array_buffer() is true. This will refer to the same
/// <code>ArrayBuffer</code> as var, but allows you to access methods
@@ -27,7 +31,7 @@ class VarArrayBuffer : public Var {
/// @param[in] var An <code>ArrayBuffer</code> var.
explicit VarArrayBuffer(const Var& var);
- /// Construct a new <code>VarArrayBuffer_Dev</code> which is
+ /// Construct a new <code>VarArrayBuffer</code> which is
/// <code>size_in_bytes</code> bytes long and initialized to zero.
///
/// @param[in] size_in_bytes The size of the constructed
@@ -50,7 +54,7 @@ class VarArrayBuffer : public Var {
/// This function assigns one <code>VarArrayBuffer</code> to another
/// <code>VarArrayBuffer</code>. A Var's assignment operator is overloaded
/// here so that we can check for assigning a non-ArrayBuffer var to a
- /// <code>VarArrayBuffer_Dev</code>.
+ /// <code>VarArrayBuffer</code>.
///
/// @param[in] other The <code>VarArrayBuffer</code> to be assigned.
///
@@ -90,6 +94,9 @@ class VarArrayBuffer : public Var {
/// space. Use this if you want to save memory but might want to call Map()
/// to map the buffer again later.
void Unmap();
+
+ private:
+ void ConstructWithSize(uint32_t size_in_bytes);
};
} // namespace pp
« no previous file with comments | « ppapi/cpp/extensions/from_var_converter.h ('k') | ppapi/cpp/var_array_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698