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 PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ |
6 #define PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ | 6 #define PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
10 | 10 |
11 namespace pp { | 11 namespace pp { |
12 | 12 |
13 class Instance; | 13 class InstanceHandle; |
14 | 14 |
15 class ResourceArray_Dev : public Resource { | 15 class ResourceArray_Dev : public Resource { |
16 public: | 16 public: |
17 ResourceArray_Dev(); | 17 ResourceArray_Dev(); |
18 | 18 |
19 struct PassRef {}; | |
20 | |
21 ResourceArray_Dev(PassRef, PP_Resource resource); | 19 ResourceArray_Dev(PassRef, PP_Resource resource); |
22 | 20 |
23 ResourceArray_Dev(const ResourceArray_Dev& other); | 21 ResourceArray_Dev(const ResourceArray_Dev& other); |
24 | 22 |
25 ResourceArray_Dev(Instance* instance, | 23 ResourceArray_Dev(const InstanceHandle& instance, |
26 const PP_Resource elements[], | 24 const PP_Resource elements[], |
27 uint32_t size); | 25 uint32_t size); |
28 | 26 |
29 virtual ~ResourceArray_Dev(); | 27 virtual ~ResourceArray_Dev(); |
30 | 28 |
31 ResourceArray_Dev& operator=(const ResourceArray_Dev& other); | 29 ResourceArray_Dev& operator=(const ResourceArray_Dev& other); |
32 | 30 |
33 uint32_t size() const; | 31 uint32_t size() const; |
34 | 32 |
35 PP_Resource operator[](uint32_t index) const; | 33 PP_Resource operator[](uint32_t index) const; |
36 }; | 34 }; |
37 | 35 |
38 } // namespace pp | 36 } // namespace pp |
39 | 37 |
40 #endif // PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ | 38 #endif // PPAPI_CPP_DEV_RESOURCE_ARRAY_DEV_H_ |
OLD | NEW |