Index: ppapi/cpp/dev/device_ref_dev.cc |
diff --git a/ppapi/cpp/dev/device_ref_dev.cc b/ppapi/cpp/dev/device_ref_dev.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4513699d82b71359fa6f65a074fcc928d0d921c6 |
--- /dev/null |
+++ b/ppapi/cpp/dev/device_ref_dev.cc |
@@ -0,0 +1,48 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ppapi/cpp/dev/device_ref_dev.h" |
+ |
+#include "ppapi/cpp/module_impl.h" |
+ |
+namespace pp { |
+ |
+namespace { |
+ |
+template <> const char* interface_name<PPB_DeviceRef_Dev>() { |
+ return PPB_DEVICEREF_DEV_INTERFACE; |
+} |
+ |
+} // namespace |
+ |
+DeviceRef_Dev::DeviceRef_Dev() { |
+} |
+ |
+DeviceRef_Dev::DeviceRef_Dev(PP_Resource resource) : Resource(resource) { |
+} |
+ |
+DeviceRef_Dev::DeviceRef_Dev(PassRef, PP_Resource resource) { |
+ PassRefFromConstructor(resource); |
+} |
+ |
+DeviceRef_Dev::DeviceRef_Dev(const DeviceRef_Dev& other) : Resource(other) { |
+} |
+ |
+DeviceRef_Dev::~DeviceRef_Dev() { |
+} |
+ |
+PP_DeviceType_Dev DeviceRef_Dev::GetType() const { |
+ if (!has_interface<PPB_DeviceRef_Dev>()) |
+ return PP_DEVICETYPE_INVALID; |
+ return get_interface<PPB_DeviceRef_Dev>()->GetType(pp_resource()); |
+} |
+ |
+Var DeviceRef_Dev::GetName() const { |
+ if (!has_interface<PPB_DeviceRef_Dev>()) |
+ return Var(); |
+ return Var(Var::PassRef(), |
+ get_interface<PPB_DeviceRef_Dev>()->GetName(pp_resource())); |
+} |
+ |
+} // namespace pp |