| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 PP_DeviceType_Dev type; | 23 PP_DeviceType_Dev type; |
| 24 std::string name; | 24 std::string name; |
| 25 std::string id; | 25 std::string id; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 class PPAPI_SHARED_EXPORT PPB_DeviceRef_Shared | 28 class PPAPI_SHARED_EXPORT PPB_DeviceRef_Shared |
| 29 : public Resource, | 29 : public Resource, |
| 30 public thunk::PPB_DeviceRef_API { | 30 public thunk::PPB_DeviceRef_API { |
| 31 public: | 31 public: |
| 32 struct InitAsImpl {}; | 32 PPB_DeviceRef_Shared(ResourceObjectType type, |
| 33 struct InitAsProxy {}; | |
| 34 | |
| 35 // The dummy arguments control which version of Resource's constructor is | |
| 36 // called for this base class. | |
| 37 PPB_DeviceRef_Shared(const InitAsImpl&, | |
| 38 PP_Instance instance, | |
| 39 const DeviceRefData& data); | |
| 40 PPB_DeviceRef_Shared(const InitAsProxy&, | |
| 41 PP_Instance instance, | 33 PP_Instance instance, |
| 42 const DeviceRefData& data); | 34 const DeviceRefData& data); |
| 43 | 35 |
| 44 // Resource overrides. | 36 // Resource overrides. |
| 45 virtual PPB_DeviceRef_API* AsPPB_DeviceRef_API() OVERRIDE; | 37 virtual PPB_DeviceRef_API* AsPPB_DeviceRef_API() OVERRIDE; |
| 46 | 38 |
| 47 // PPB_DeviceRef_API implementation. | 39 // PPB_DeviceRef_API implementation. |
| 48 virtual const DeviceRefData& GetDeviceRefData() const OVERRIDE; | 40 virtual const DeviceRefData& GetDeviceRefData() const OVERRIDE; |
| 49 virtual PP_DeviceType_Dev GetType() OVERRIDE; | 41 virtual PP_DeviceType_Dev GetType() OVERRIDE; |
| 50 virtual PP_Var GetName() OVERRIDE; | 42 virtual PP_Var GetName() OVERRIDE; |
| 51 | 43 |
| 52 private: | 44 private: |
| 53 DeviceRefData data_; | 45 DeviceRefData data_; |
| 54 | 46 |
| 55 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_DeviceRef_Shared); | 47 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_DeviceRef_Shared); |
| 56 }; | 48 }; |
| 57 | 49 |
| 58 } // namespace ppapi | 50 } // namespace ppapi |
| 59 | 51 |
| 60 #endif // PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ | 52 #endif // PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_ |
| OLD | NEW |