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
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
7 #include "ppapi/shared_impl/host_resource.h"
8 #include "ppapi/shared_impl/ppapi_globals.h"
9 #include "ppapi/shared_impl/resource_tracker.h"
10 #include "ppapi/shared_impl/var.h"
12 using ppapi::thunk::PPB_DeviceRef_API
;
16 DeviceRefData::DeviceRefData()
17 : type(PP_DEVICETYPE_DEV_INVALID
) {
20 PPB_DeviceRef_Shared::PPB_DeviceRef_Shared(ResourceObjectType type
,
22 const DeviceRefData
& data
)
23 : Resource(type
, instance
),
27 PPB_DeviceRef_API
* PPB_DeviceRef_Shared::AsPPB_DeviceRef_API() {
31 const DeviceRefData
& PPB_DeviceRef_Shared::GetDeviceRefData() const {
35 PP_DeviceType_Dev
PPB_DeviceRef_Shared::GetType() {
39 PP_Var
PPB_DeviceRef_Shared::GetName() {
40 return StringVar::StringToPPVar(data_
.name
);