| Index: ppapi/cpp/private/flash_drm.cc
|
| diff --git a/ppapi/cpp/private/flash_device_id.cc b/ppapi/cpp/private/flash_drm.cc
|
| similarity index 54%
|
| copy from ppapi/cpp/private/flash_device_id.cc
|
| copy to ppapi/cpp/private/flash_drm.cc
|
| index 6ed893573ec75f8aefb87ea7393db1e4713ee234..7307445fb2ef0379568b1999ecb9a4103733f150 100644
|
| --- a/ppapi/cpp/private/flash_device_id.cc
|
| +++ b/ppapi/cpp/private/flash_drm.cc
|
| @@ -2,16 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ppapi/cpp/private/flash_device_id.h"
|
| +#include "ppapi/cpp/private/flash_drm.h"
|
|
|
| #include "ppapi/c/pp_errors.h"
|
| #include "ppapi/c/private/ppb_flash_device_id.h"
|
| +#include "ppapi/c/private/ppb_flash_drm.h"
|
| #include "ppapi/cpp/module_impl.h"
|
|
|
| namespace pp {
|
|
|
| namespace {
|
|
|
| +template <> const char* interface_name<PPB_Flash_DRM_1_0>() {
|
| + return PPB_FLASH_DRM_INTERFACE_1_0;
|
| +}
|
| +
|
| template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() {
|
| return PPB_FLASH_DEVICEID_INTERFACE_1_0;
|
| }
|
| @@ -20,18 +25,26 @@ template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() {
|
|
|
| namespace flash {
|
|
|
| -DeviceID::DeviceID() {
|
| +DRM::DRM() {
|
| }
|
|
|
| -DeviceID::DeviceID(const InstanceHandle& instance) : Resource() {
|
| - if (has_interface<PPB_Flash_DeviceID_1_0>()) {
|
| +DRM::DRM(const InstanceHandle& instance) : Resource() {
|
| + if (has_interface<PPB_Flash_DRM_1_0>()) {
|
| + PassRefFromConstructor(get_interface<PPB_Flash_DRM_1_0>()->Create(
|
| + instance.pp_instance()));
|
| + } else if (has_interface<PPB_Flash_DeviceID_1_0>()) {
|
| PassRefFromConstructor(get_interface<PPB_Flash_DeviceID_1_0>()->Create(
|
| instance.pp_instance()));
|
| }
|
| }
|
|
|
| -int32_t DeviceID::GetDeviceID(
|
| - const CompletionCallbackWithOutput<Var>& callback) {
|
| +int32_t DRM::GetDeviceID(const CompletionCallbackWithOutput<Var>& callback) {
|
| + if (has_interface<PPB_Flash_DRM_1_0>()) {
|
| + return get_interface<PPB_Flash_DRM_1_0>()->GetDeviceID(
|
| + pp_resource(),
|
| + callback.output(),
|
| + callback.pp_completion_callback());
|
| + }
|
| if (has_interface<PPB_Flash_DeviceID_1_0>()) {
|
| return get_interface<PPB_Flash_DeviceID_1_0>()->GetDeviceID(
|
| pp_resource(),
|
|
|