summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc15
-rw-r--r--chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h1
-rw-r--r--ppapi/api/private/ppb_flash_drm.idl13
-rw-r--r--ppapi/c/private/ppb_flash_drm.h28
-rw-r--r--ppapi/cpp/private/flash_drm.cc37
-rw-r--r--ppapi/cpp/private/flash_drm.h4
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c45
-rw-r--r--ppapi/proxy/flash_drm_resource.cc28
-rw-r--r--ppapi/proxy/flash_drm_resource.h8
-rw-r--r--ppapi/proxy/ppapi_messages.h8
-rw-r--r--ppapi/thunk/ppb_flash_drm_api.h3
-rw-r--r--ppapi/thunk/ppb_flash_drm_thunk.cc25
12 files changed, 208 insertions, 7 deletions
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
index 22d9401..99d76a1 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
@@ -145,6 +145,8 @@ int32_t PepperFlashDRMHost::OnResourceMessageReceived(
OnHostMsgGetDeviceID)
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetHmonitor,
OnHostMsgGetHmonitor)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_MonitorIsExternal,
+ OnHostMsgMonitorIsExternal)
IPC_END_MESSAGE_MAP()
return PP_ERROR_FAILED;
}
@@ -170,6 +172,19 @@ int32_t PepperFlashDRMHost::OnHostMsgGetHmonitor(
}
}
+int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
+ ppapi::host::HostMessageContext* context) {
+ int64_t monitor_id = monitor_finder_->GetMonitor();
+ if (monitor_id) {
+ // TODO(bbudge) get information about whether monitor is external.
+ context->reply_msg =
+ PpapiPluginMsg_FlashDRM_MonitorIsExternalReply(PP_FALSE);
+ return PP_OK;
+ } else {
+ return PP_ERROR_FAILED;
+ }
+}
+
void PepperFlashDRMHost::GotDeviceID(
ppapi::host::ReplyMessageContext reply_context,
const std::string& id,
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
index be3bf25..4e87f18 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
@@ -39,6 +39,7 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost {
// IPC message handler.
int32_t OnHostMsgGetDeviceID(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgGetHmonitor(ppapi::host::HostMessageContext* context);
+ int32_t OnHostMsgMonitorIsExternal(ppapi::host::HostMessageContext* context);
// Called by the fetcher when the device ID was retrieved, or the empty string
// on error.
diff --git a/ppapi/api/private/ppb_flash_drm.idl b/ppapi/api/private/ppb_flash_drm.idl
index 3131972..c6f6eff 100644
--- a/ppapi/api/private/ppb_flash_drm.idl
+++ b/ppapi/api/private/ppb_flash_drm.idl
@@ -10,7 +10,8 @@
[generate_thunk]
label Chrome {
- M29 = 1.0
+ M29 = 1.0,
+ M33 = 1.1
};
/**
@@ -48,5 +49,15 @@ interface PPB_Flash_DRM {
int32_t GetVoucherFile([in] PP_Resource drm,
[out] PP_Resource file_ref,
[in] PP_CompletionCallback callback);
+
+ /**
+ * Asynchronously returns a value indicating whether the monitor on which the
+ * plugin instance is displayed is external. |callback| will be called upon
+ * completion.
+ */
+ [version=1.1]
+ int32_t MonitorIsExternal([in] PP_Resource drm,
+ [out] PP_Bool is_external,
+ [in] PP_CompletionCallback callback);
};
diff --git a/ppapi/c/private/ppb_flash_drm.h b/ppapi/c/private/ppb_flash_drm.h
index 85033a4..88d0f76 100644
--- a/ppapi/c/private/ppb_flash_drm.h
+++ b/ppapi/c/private/ppb_flash_drm.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/ppb_flash_drm.idl modified Sat Jun 8 16:45:26 2013. */
+/* From private/ppb_flash_drm.idl modified Mon Nov 11 14:49:53 2013. */
#ifndef PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_
#define PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_
@@ -17,7 +17,8 @@
#include "ppapi/c/pp_var.h"
#define PPB_FLASH_DRM_INTERFACE_1_0 "PPB_Flash_DRM;1.0"
-#define PPB_FLASH_DRM_INTERFACE PPB_FLASH_DRM_INTERFACE_1_0
+#define PPB_FLASH_DRM_INTERFACE_1_1 "PPB_Flash_DRM;1.1"
+#define PPB_FLASH_DRM_INTERFACE PPB_FLASH_DRM_INTERFACE_1_1
/**
* @file
@@ -32,7 +33,7 @@
/**
* A resource for performing Flash DRM-related operations.
*/
-struct PPB_Flash_DRM_1_0 {
+struct PPB_Flash_DRM_1_1 {
/**
* Creates a PPB_Flash_DRM resource for performing DRM-related operations in
* Flash.
@@ -60,9 +61,28 @@ struct PPB_Flash_DRM_1_0 {
int32_t (*GetVoucherFile)(PP_Resource drm,
PP_Resource* file_ref,
struct PP_CompletionCallback callback);
+ /**
+ * Asynchronously returns a value indicating whether the monitor on which the
+ * plugin instance is displayed is external. |callback| will be called upon
+ * completion.
+ */
+ int32_t (*MonitorIsExternal)(PP_Resource drm,
+ PP_Bool* is_external,
+ struct PP_CompletionCallback callback);
};
-typedef struct PPB_Flash_DRM_1_0 PPB_Flash_DRM;
+typedef struct PPB_Flash_DRM_1_1 PPB_Flash_DRM;
+
+struct PPB_Flash_DRM_1_0 {
+ PP_Resource (*Create)(PP_Instance instance);
+ int32_t (*GetDeviceID)(PP_Resource drm,
+ struct PP_Var* id,
+ struct PP_CompletionCallback callback);
+ PP_Bool (*GetHmonitor)(PP_Resource drm, int64_t* hmonitor);
+ int32_t (*GetVoucherFile)(PP_Resource drm,
+ PP_Resource* file_ref,
+ struct PP_CompletionCallback callback);
+};
/**
* @}
*/
diff --git a/ppapi/cpp/private/flash_drm.cc b/ppapi/cpp/private/flash_drm.cc
index f576fb2..c425c9f 100644
--- a/ppapi/cpp/private/flash_drm.cc
+++ b/ppapi/cpp/private/flash_drm.cc
@@ -17,6 +17,10 @@ template <> const char* interface_name<PPB_Flash_DRM_1_0>() {
return PPB_FLASH_DRM_INTERFACE_1_0;
}
+template <> const char* interface_name<PPB_Flash_DRM_1_1>() {
+ return PPB_FLASH_DRM_INTERFACE_1_1;
+}
+
template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() {
return PPB_FLASH_DEVICEID_INTERFACE_1_0;
}
@@ -29,7 +33,10 @@ DRM::DRM() {
}
DRM::DRM(const InstanceHandle& instance) : Resource() {
- if (has_interface<PPB_Flash_DRM_1_0>()) {
+ if (has_interface<PPB_Flash_DRM_1_1>()) {
+ PassRefFromConstructor(get_interface<PPB_Flash_DRM_1_1>()->Create(
+ instance.pp_instance()));
+ } else 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>()) {
@@ -39,6 +46,12 @@ DRM::DRM(const InstanceHandle& instance) : Resource() {
}
int32_t DRM::GetDeviceID(const CompletionCallbackWithOutput<Var>& callback) {
+ if (has_interface<PPB_Flash_DRM_1_1>()) {
+ return get_interface<PPB_Flash_DRM_1_1>()->GetDeviceID(
+ pp_resource(),
+ callback.output(),
+ callback.pp_completion_callback());
+ }
if (has_interface<PPB_Flash_DRM_1_0>()) {
return get_interface<PPB_Flash_DRM_1_0>()->GetDeviceID(
pp_resource(),
@@ -55,6 +68,11 @@ int32_t DRM::GetDeviceID(const CompletionCallbackWithOutput<Var>& callback) {
}
bool DRM::GetHmonitor(int64_t* hmonitor) {
+ if (has_interface<PPB_Flash_DRM_1_1>()) {
+ return PP_ToBool(get_interface<PPB_Flash_DRM_1_1>()->GetHmonitor(
+ pp_resource(),
+ hmonitor));
+ }
if (has_interface<PPB_Flash_DRM_1_0>()) {
return PP_ToBool(get_interface<PPB_Flash_DRM_1_0>()->GetHmonitor(
pp_resource(),
@@ -65,6 +83,12 @@ bool DRM::GetHmonitor(int64_t* hmonitor) {
int32_t DRM::GetVoucherFile(
const CompletionCallbackWithOutput<FileRef>& callback) {
+ if (has_interface<PPB_Flash_DRM_1_1>()) {
+ return get_interface<PPB_Flash_DRM_1_1>()->GetVoucherFile(
+ pp_resource(),
+ callback.output(),
+ callback.pp_completion_callback());
+ }
if (has_interface<PPB_Flash_DRM_1_0>()) {
return get_interface<PPB_Flash_DRM_1_0>()->GetVoucherFile(
pp_resource(),
@@ -74,5 +98,16 @@ int32_t DRM::GetVoucherFile(
return PP_ERROR_NOINTERFACE;
}
+int32_t DRM::MonitorIsExternal(
+ const CompletionCallbackWithOutput<PP_Bool>& callback) {
+ if (has_interface<PPB_Flash_DRM_1_1>()) {
+ return get_interface<PPB_Flash_DRM_1_1>()->MonitorIsExternal(
+ pp_resource(),
+ callback.output(),
+ callback.pp_completion_callback());
+ }
+ return PP_ERROR_NOINTERFACE;
+}
+
} // namespace flash
} // namespace pp
diff --git a/ppapi/cpp/private/flash_drm.h b/ppapi/cpp/private/flash_drm.h
index 45ecde8..2edddac 100644
--- a/ppapi/cpp/private/flash_drm.h
+++ b/ppapi/cpp/private/flash_drm.h
@@ -27,6 +27,10 @@ class DRM : public Resource {
bool GetHmonitor(int64_t* hmonitor);
// Returns the voucher file as a FileRef or an invalid resource on failure.
int32_t GetVoucherFile(const CompletionCallbackWithOutput<FileRef>& callback);
+ // On success, returns a value indicating if the monitor associated with the
+ // current plugin instance is external.
+ int32_t MonitorIsExternal(
+ const CompletionCallbackWithOutput<PP_Bool>& callback);
};
} // namespace flash
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index 8a6d7ba..8f5ea4f 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -207,6 +207,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_4_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DeviceID_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_0;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Menu_0_2;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_HostResolver_Private_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Instance_Private_0_1;
@@ -2825,6 +2826,35 @@ static int32_t Pnacl_M29_PPB_Flash_DRM_GetVoucherFile(PP_Resource drm, PP_Resour
/* End wrapper methods for PPB_Flash_DRM_1_0 */
+/* Begin wrapper methods for PPB_Flash_DRM_1_1 */
+
+static PP_Resource Pnacl_M33_PPB_Flash_DRM_Create(PP_Instance instance) {
+ const struct PPB_Flash_DRM_1_1 *iface = Pnacl_WrapperInfo_PPB_Flash_DRM_1_1.real_iface;
+ return iface->Create(instance);
+}
+
+static int32_t Pnacl_M33_PPB_Flash_DRM_GetDeviceID(PP_Resource drm, struct PP_Var* id, struct PP_CompletionCallback* callback) {
+ const struct PPB_Flash_DRM_1_1 *iface = Pnacl_WrapperInfo_PPB_Flash_DRM_1_1.real_iface;
+ return iface->GetDeviceID(drm, id, *callback);
+}
+
+static PP_Bool Pnacl_M33_PPB_Flash_DRM_GetHmonitor(PP_Resource drm, int64_t* hmonitor) {
+ const struct PPB_Flash_DRM_1_1 *iface = Pnacl_WrapperInfo_PPB_Flash_DRM_1_1.real_iface;
+ return iface->GetHmonitor(drm, hmonitor);
+}
+
+static int32_t Pnacl_M33_PPB_Flash_DRM_GetVoucherFile(PP_Resource drm, PP_Resource* file_ref, struct PP_CompletionCallback* callback) {
+ const struct PPB_Flash_DRM_1_1 *iface = Pnacl_WrapperInfo_PPB_Flash_DRM_1_1.real_iface;
+ return iface->GetVoucherFile(drm, file_ref, *callback);
+}
+
+static int32_t Pnacl_M33_PPB_Flash_DRM_MonitorIsExternal(PP_Resource drm, PP_Bool* is_external, struct PP_CompletionCallback* callback) {
+ const struct PPB_Flash_DRM_1_1 *iface = Pnacl_WrapperInfo_PPB_Flash_DRM_1_1.real_iface;
+ return iface->MonitorIsExternal(drm, is_external, *callback);
+}
+
+/* End wrapper methods for PPB_Flash_DRM_1_1 */
+
/* Not generating wrapper methods for PPB_Flash_FontFile_0_1 */
/* Not generating wrapper methods for PPB_FlashFullscreen_0_1 */
@@ -4802,6 +4832,14 @@ struct PPB_Flash_DRM_1_0 Pnacl_Wrappers_PPB_Flash_DRM_1_0 = {
.GetVoucherFile = (int32_t (*)(PP_Resource drm, PP_Resource* file_ref, struct PP_CompletionCallback callback))&Pnacl_M29_PPB_Flash_DRM_GetVoucherFile
};
+struct PPB_Flash_DRM_1_1 Pnacl_Wrappers_PPB_Flash_DRM_1_1 = {
+ .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M33_PPB_Flash_DRM_Create,
+ .GetDeviceID = (int32_t (*)(PP_Resource drm, struct PP_Var* id, struct PP_CompletionCallback callback))&Pnacl_M33_PPB_Flash_DRM_GetDeviceID,
+ .GetHmonitor = (PP_Bool (*)(PP_Resource drm, int64_t* hmonitor))&Pnacl_M33_PPB_Flash_DRM_GetHmonitor,
+ .GetVoucherFile = (int32_t (*)(PP_Resource drm, PP_Resource* file_ref, struct PP_CompletionCallback callback))&Pnacl_M33_PPB_Flash_DRM_GetVoucherFile,
+ .MonitorIsExternal = (int32_t (*)(PP_Resource drm, PP_Bool* is_external, struct PP_CompletionCallback callback))&Pnacl_M33_PPB_Flash_DRM_MonitorIsExternal
+};
+
/* Not generating wrapper interface for PPB_Flash_FontFile_0_1 */
/* Not generating wrapper interface for PPB_FlashFullscreen_0_1 */
@@ -5543,6 +5581,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_0 = {
.real_iface = NULL
};
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_1 = {
+ .iface_macro = PPB_FLASH_DRM_INTERFACE_1_1,
+ .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Flash_DRM_1_1,
+ .real_iface = NULL
+};
+
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Menu_0_2 = {
.iface_macro = PPB_FLASH_MENU_INTERFACE_0_2,
.wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Flash_Menu_0_2,
@@ -5798,6 +5842,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_0,
&Pnacl_WrapperInfo_PPB_Flash_DeviceID_1_0,
&Pnacl_WrapperInfo_PPB_Flash_DRM_1_0,
+ &Pnacl_WrapperInfo_PPB_Flash_DRM_1_1,
&Pnacl_WrapperInfo_PPB_Flash_Menu_0_2,
&Pnacl_WrapperInfo_PPB_HostResolver_Private_0_1,
&Pnacl_WrapperInfo_PPB_Instance_Private_0_1,
diff --git a/ppapi/proxy/flash_drm_resource.cc b/ppapi/proxy/flash_drm_resource.cc
index 889aa72..8c80c59 100644
--- a/ppapi/proxy/flash_drm_resource.cc
+++ b/ppapi/proxy/flash_drm_resource.cc
@@ -71,6 +71,22 @@ int32_t FlashDRMResource::GetVoucherFile(
return PP_OK_COMPLETIONPENDING;
}
+int32_t FlashDRMResource::MonitorIsExternal(
+ PP_Bool* is_external,
+ scoped_refptr<TrackedCallback> callback) {
+ if (!is_external)
+ return PP_ERROR_BADARGUMENT;
+
+ *is_external = PP_FALSE;
+
+ Call<PpapiPluginMsg_FlashDRM_MonitorIsExternalReply>(
+ BROWSER,
+ PpapiHostMsg_FlashDRM_MonitorIsExternal(),
+ base::Bind(&FlashDRMResource::OnPluginMsgMonitorIsExternalReply, this,
+ is_external, callback));
+ return PP_OK_COMPLETIONPENDING;
+}
+
void FlashDRMResource::OnPluginMsgGetDeviceIDReply(
PP_Var* dest,
scoped_refptr<TrackedCallback> callback,
@@ -99,5 +115,17 @@ void FlashDRMResource::OnPluginMsgGetVoucherFileReply(
}
}
+void FlashDRMResource::OnPluginMsgMonitorIsExternalReply(
+ PP_Bool* dest,
+ scoped_refptr<TrackedCallback> callback,
+ const ResourceMessageReplyParams& params,
+ PP_Bool is_external) {
+ if (TrackedCallback::IsPending(callback)) {
+ if (params.result() == PP_OK)
+ *dest = is_external;
+ callback->Run(params.result());
+ }
+}
+
} // namespace proxy
} // namespace ppapi
diff --git a/ppapi/proxy/flash_drm_resource.h b/ppapi/proxy/flash_drm_resource.h
index 9a4b31c..dd2b599 100644
--- a/ppapi/proxy/flash_drm_resource.h
+++ b/ppapi/proxy/flash_drm_resource.h
@@ -35,6 +35,9 @@ class FlashDRMResource
virtual int32_t GetVoucherFile(
PP_Resource* file_ref,
scoped_refptr<TrackedCallback> callback) OVERRIDE;
+ virtual int32_t MonitorIsExternal(
+ PP_Bool* is_external,
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
private:
void OnPluginMsgGetDeviceIDReply(PP_Var* dest,
@@ -45,6 +48,11 @@ class FlashDRMResource
scoped_refptr<TrackedCallback> callback,
const ResourceMessageReplyParams& params,
const FileRefCreateInfo& file_info);
+ void OnPluginMsgMonitorIsExternalReply(
+ PP_Bool* dest,
+ scoped_refptr<TrackedCallback> callback,
+ const ResourceMessageReplyParams& params,
+ PP_Bool is_external);
DISALLOW_COPY_AND_ASSIGN(FlashDRMResource);
};
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index e41284c..8118bdd 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -1337,6 +1337,14 @@ IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetVoucherFile)
IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetVoucherFileReply,
ppapi::FileRefCreateInfo /* file_info */)
+// Requests a value indicating whether the monitor on which the instance is
+// displayed is external.
+IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_MonitorIsExternal)
+// Reply message for MonitorIsExternal which contains the value indicating if
+// the monitor is external.
+IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_MonitorIsExternalReply,
+ PP_Bool /* is_external */)
+
// Gamepad.
IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_Create)
diff --git a/ppapi/thunk/ppb_flash_drm_api.h b/ppapi/thunk/ppb_flash_drm_api.h
index 87712b9..9937bef 100644
--- a/ppapi/thunk/ppb_flash_drm_api.h
+++ b/ppapi/thunk/ppb_flash_drm_api.h
@@ -20,6 +20,9 @@ class PPAPI_THUNK_EXPORT PPB_Flash_DRM_API {
virtual PP_Bool GetHmonitor(int64_t* hmonitor) = 0;
virtual int32_t GetVoucherFile(PP_Resource* file_ref,
scoped_refptr<TrackedCallback> callback) = 0;
+ virtual int32_t MonitorIsExternal(
+ PP_Bool* is_external,
+ scoped_refptr<TrackedCallback> callback) = 0;
};
} // namespace thunk
diff --git a/ppapi/thunk/ppb_flash_drm_thunk.cc b/ppapi/thunk/ppb_flash_drm_thunk.cc
index eff2fdf..a7a3cba 100644
--- a/ppapi/thunk/ppb_flash_drm_thunk.cc
+++ b/ppapi/thunk/ppb_flash_drm_thunk.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// From private/ppb_flash_drm.idl modified Sat Jun 8 16:45:26 2013.
+// From private/ppb_flash_drm.idl modified Mon Nov 11 14:49:53 2013.
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
@@ -56,6 +56,17 @@ int32_t GetVoucherFile(PP_Resource drm,
enter.callback()));
}
+int32_t MonitorIsExternal(PP_Resource drm,
+ PP_Bool* is_external,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_Flash_DRM::MonitorIsExternal()";
+ EnterResource<PPB_Flash_DRM_API> enter(drm, callback, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(enter.object()->MonitorIsExternal(is_external,
+ enter.callback()));
+}
+
const PPB_Flash_DRM_1_0 g_ppb_flash_drm_thunk_1_0 = {
&Create,
&GetDeviceID,
@@ -63,11 +74,23 @@ const PPB_Flash_DRM_1_0 g_ppb_flash_drm_thunk_1_0 = {
&GetVoucherFile
};
+const PPB_Flash_DRM_1_1 g_ppb_flash_drm_thunk_1_1 = {
+ &Create,
+ &GetDeviceID,
+ &GetHmonitor,
+ &GetVoucherFile,
+ &MonitorIsExternal
+};
+
} // namespace
const PPB_Flash_DRM_1_0* GetPPB_Flash_DRM_1_0_Thunk() {
return &g_ppb_flash_drm_thunk_1_0;
}
+const PPB_Flash_DRM_1_1* GetPPB_Flash_DRM_1_1_Thunk() {
+ return &g_ppb_flash_drm_thunk_1_1;
+}
+
} // namespace thunk
} // namespace ppapi