OLD | NEW |
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_SHARED_IMPL_ARRAY_VAR_H_ | 5 #ifndef PPAPI_SHARED_IMPL_ARRAY_VAR_H_ |
6 #define PPAPI_SHARED_IMPL_ARRAY_VAR_H_ | 6 #define PPAPI_SHARED_IMPL_ARRAY_VAR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Var overrides. | 30 // Var overrides. |
31 virtual ArrayVar* AsArrayVar() OVERRIDE; | 31 virtual ArrayVar* AsArrayVar() OVERRIDE; |
32 virtual PP_VarType GetType() const OVERRIDE; | 32 virtual PP_VarType GetType() const OVERRIDE; |
33 | 33 |
34 // The returned PP_Var has had a ref added on behalf of the caller. | 34 // The returned PP_Var has had a ref added on behalf of the caller. |
35 PP_Var Get(uint32_t index) const; | 35 PP_Var Get(uint32_t index) const; |
36 PP_Bool Set(uint32_t index, const PP_Var& value); | 36 PP_Bool Set(uint32_t index, const PP_Var& value); |
37 uint32_t GetLength() const; | 37 uint32_t GetLength() const; |
38 PP_Bool SetLength(uint32_t length); | 38 PP_Bool SetLength(uint32_t length); |
39 | 39 |
40 const ElementVector& elements() const { | 40 const ElementVector& elements() const { return elements_; } |
41 return elements_; | |
42 } | |
43 | 41 |
44 ElementVector& elements() { | 42 ElementVector& elements() { return elements_; } |
45 return elements_; | |
46 } | |
47 | 43 |
48 protected: | 44 protected: |
49 virtual ~ArrayVar(); | 45 virtual ~ArrayVar(); |
50 | 46 |
51 private: | 47 private: |
52 ElementVector elements_; | 48 ElementVector elements_; |
53 | 49 |
54 DISALLOW_COPY_AND_ASSIGN(ArrayVar); | 50 DISALLOW_COPY_AND_ASSIGN(ArrayVar); |
55 }; | 51 }; |
56 | 52 |
57 } // namespace ppapi | 53 } // namespace ppapi |
58 | 54 |
59 #endif // PPAPI_SHARED_IMPL_ARRAY_VAR_H_ | 55 #endif // PPAPI_SHARED_IMPL_ARRAY_VAR_H_ |
OLD | NEW |