summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/flash_drm_resource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/flash_drm_resource.cc')
-rw-r--r--ppapi/proxy/flash_drm_resource.cc28
1 files changed, 28 insertions, 0 deletions
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