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_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
9 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "ppapi/shared_impl/resource.h" | 13 #include "ppapi/shared_impl/resource.h" |
13 #include "ppapi/thunk/ppb_device_ref_api.h" | 14 #include "ppapi/thunk/ppb_device_ref_api.h" |
14 | 15 |
15 namespace ppapi { | 16 namespace ppapi { |
16 | 17 |
17 // IF YOU ADD STUFF TO THIS CLASS | 18 // IF YOU ADD STUFF TO THIS CLASS |
18 // ============================== | 19 // ============================== |
(...skipping 23 matching lines...) Expand all Loading... |
42 const DeviceRefData& data); | 43 const DeviceRefData& data); |
43 | 44 |
44 // Resource overrides. | 45 // Resource overrides. |
45 virtual PPB_DeviceRef_API* AsPPB_DeviceRef_API() OVERRIDE; | 46 virtual PPB_DeviceRef_API* AsPPB_DeviceRef_API() OVERRIDE; |
46 | 47 |
47 // PPB_DeviceRef_API implementation. | 48 // PPB_DeviceRef_API implementation. |
48 virtual const DeviceRefData& GetDeviceRefData() const OVERRIDE; | 49 virtual const DeviceRefData& GetDeviceRefData() const OVERRIDE; |
49 virtual PP_DeviceType_Dev GetType() OVERRIDE; | 50 virtual PP_DeviceType_Dev GetType() OVERRIDE; |
50 virtual PP_Var GetName() OVERRIDE; | 51 virtual PP_Var GetName() OVERRIDE; |
51 | 52 |
| 53 static PP_Resource CreateResourceArray( |
| 54 bool init_as_impl, |
| 55 PP_Instance instance, |
| 56 const std::vector<DeviceRefData>& devices); |
| 57 |
52 private: | 58 private: |
53 DeviceRefData data_; | 59 DeviceRefData data_; |
54 | 60 |
55 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_DeviceRef_Shared); | 61 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_DeviceRef_Shared); |
56 }; | 62 }; |
57 | 63 |
58 } // namespace ppapi | 64 } // namespace ppapi |
59 | 65 |
60 #endif // PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ | 66 #endif // PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ |
OLD | NEW |