Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: ppapi/proxy/flash_drm_resource.cc

Issue 68773004: Pepper: Add MonitorIsExternal function to PPB_Flash_DRM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TODO, interface ordering.x Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/flash_drm_resource.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/flash_drm_resource.cc
diff --git a/ppapi/proxy/flash_drm_resource.cc b/ppapi/proxy/flash_drm_resource.cc
index 889aa72b457053fda9bf7256035a65e2d3d36377..8c80c5912b1342ae67e3eaa048b113fca6ece76a 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
« no previous file with comments | « ppapi/proxy/flash_drm_resource.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698