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

Side by Side Diff: ppapi/cpp/var_array.h

Issue 16136009: Move PPB_VarArray and PPB_VarDictionary out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CPP_DEV_VAR_ARRAY_DEV_H_ 5 #ifndef PPAPI_CPP_VAR_ARRAY_H_
6 #define PPAPI_CPP_DEV_VAR_ARRAY_DEV_H_ 6 #define PPAPI_CPP_VAR_ARRAY_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_stdint.h" 9 #include "ppapi/c/pp_stdint.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
11 11
12 /// @file 12 /// @file
13 /// This file defines the API for interacting with array vars. 13 /// This file defines the API for interacting with array vars.
14 14
15 namespace pp { 15 namespace pp {
16 16
17 class VarArray_Dev : public Var { 17 class VarArray : public Var {
18 public: 18 public:
19 /// Constructs a new array var. 19 /// Constructs a new array var.
20 VarArray_Dev(); 20 VarArray();
21 21
22 /// Constructs a <code>VarArray_Dev</code> given a var for which is_array() is 22 /// Constructs a <code>VarArray</code> given a var for which is_array() is
23 /// true. This will refer to the same array var, but allow you to access 23 /// true. This will refer to the same array var, but allow you to access
24 /// methods specific to arrays. 24 /// methods specific to arrays.
25 /// 25 ///
26 /// @param[in] var An array var. 26 /// @param[in] var An array var.
27 explicit VarArray_Dev(const Var& var); 27 explicit VarArray(const Var& var);
28 28
29 /// Constructs a <code>VarArray_Dev</code> given a <code>PP_Var</code> of type 29 /// Constructs a <code>VarArray</code> given a <code>PP_Var</code> of type
30 /// PP_VARTYPE_ARRAY. 30 /// PP_VARTYPE_ARRAY.
31 /// 31 ///
32 /// @param[in] var A <code>PP_Var</code> of type PP_VARTYPE_ARRAY. 32 /// @param[in] var A <code>PP_Var</code> of type PP_VARTYPE_ARRAY.
33 explicit VarArray_Dev(const PP_Var& var); 33 explicit VarArray(const PP_Var& var);
34 34
35 /// Copy constructor. 35 /// Copy constructor.
36 VarArray_Dev(const VarArray_Dev& other); 36 VarArray(const VarArray& other);
37 37
38 virtual ~VarArray_Dev(); 38 virtual ~VarArray();
39 39
40 /// Assignment operator. 40 /// Assignment operator.
41 VarArray_Dev& operator=(const VarArray_Dev& other); 41 VarArray& operator=(const VarArray& other);
42 42
43 /// The <code>Var</code> assignment operator is overridden here so that we can 43 /// The <code>Var</code> assignment operator is overridden here so that we can
44 /// check for assigning a non-array var to a <code>VarArray_Dev</code>. 44 /// check for assigning a non-array var to a <code>VarArray</code>.
45 /// 45 ///
46 /// @param[in] other The array var to be assigned. 46 /// @param[in] other The array var to be assigned.
47 /// 47 ///
48 /// @return The resulting <code>VarArray_Dev</code> (as a <code>Var</code>&). 48 /// @return The resulting <code>VarArray</code> (as a <code>Var</code>&).
49 virtual Var& operator=(const Var& other); 49 virtual Var& operator=(const Var& other);
50 50
51 /// Gets an element from the array. 51 /// Gets an element from the array.
52 /// 52 ///
53 /// @param[in] index An index indicating which element to return. 53 /// @param[in] index An index indicating which element to return.
54 /// 54 ///
55 /// @return The element at the specified position. If <code>index</code> is 55 /// @return The element at the specified position. If <code>index</code> is
56 /// larger than or equal to the array length, an undefined var is returned. 56 /// larger than or equal to the array length, an undefined var is returned.
57 Var Get(uint32_t index) const; 57 Var Get(uint32_t index) const;
58 58
(...skipping 21 matching lines...) Expand all
80 /// elements that no longer fit are removed. If <code>length</code> is larger 80 /// elements that no longer fit are removed. If <code>length</code> is larger
81 /// than its current value, undefined vars are appended to increase the array 81 /// than its current value, undefined vars are appended to increase the array
82 /// to the specified length. 82 /// to the specified length.
83 /// 83 ///
84 /// @return A <code>PP_Bool</code> indicating whether the operation succeeds. 84 /// @return A <code>PP_Bool</code> indicating whether the operation succeeds.
85 PP_Bool SetLength(uint32_t length); 85 PP_Bool SetLength(uint32_t length);
86 }; 86 };
87 87
88 } // namespace pp 88 } // namespace pp
89 89
90 #endif // PPAPI_CPP_DEV_VAR_ARRAY_DEV_H_ 90 #endif // PPAPI_CPP_VAR_ARRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698