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

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: 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
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..d408a9dc7596f9dd88954ae7af8664924028ea61 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));
yzshen1 2013/11/19 23:22:59 nit: 4 more spaces indent or align with the first
bbudge 2013/11/25 21:47:59 Done.
+ 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

Powered by Google App Engine
This is Rietveld 408576698