summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/private/flash_drm.cc
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 21:36:05 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 21:36:05 +0000
commita245006a5f6f1c5abc7f3f7aecc56444847bfa48 (patch)
tree5f53ef9eb4b9b6db2dea148708747f72d72b8ed7 /ppapi/cpp/private/flash_drm.cc
parenta53f5a49c0705cdb54487555aac3f28f49bf3943 (diff)
downloadchromium_src-a245006a5f6f1c5abc7f3f7aecc56444847bfa48.zip
chromium_src-a245006a5f6f1c5abc7f3f7aecc56444847bfa48.tar.gz
chromium_src-a245006a5f6f1c5abc7f3f7aecc56444847bfa48.tar.bz2
Implement GetVoucherFile and GetHmonitor functions for PPB_Flash_DRM
This adds 2 functions to PPB_Flash_DRM which are used for Flash DRM-related features. GetVoucherFile() returns a FileRef to a flash voucher file. This file will be dropped in to the tree next to the flash DLL and will be named plugin.vch. GetHmonitor returns the HMONITOR (on windows only) associated with the monitor displaying the instance. cpu@ will implement the backend for this. BUG=242241 R=cpu@chromium.org, jam@chromium.org, jschuh@chromium.org, yzshen@chromium.org Review URL: https://codereview.chromium.org/15079003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205640 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/private/flash_drm.cc')
-rw-r--r--ppapi/cpp/private/flash_drm.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/ppapi/cpp/private/flash_drm.cc b/ppapi/cpp/private/flash_drm.cc
index 7307445..44887ab 100644
--- a/ppapi/cpp/private/flash_drm.cc
+++ b/ppapi/cpp/private/flash_drm.cc
@@ -54,5 +54,25 @@ int32_t DRM::GetDeviceID(const CompletionCallbackWithOutput<Var>& callback) {
return callback.MayForce(PP_ERROR_NOINTERFACE);
}
+bool DRM::GetHmonitor(int64_t* hmonitor) {
+ if (has_interface<PPB_Flash_DRM_1_0>()) {
+ return PP_ToBool(get_interface<PPB_Flash_DRM_1_0>()->GetHmonitor(
+ pp_resource(),
+ hmonitor));
+ }
+ return 0;
+}
+
+int32_t DRM::GetVoucherFile(
+ const CompletionCallbackWithOutput<FileRef>& callback) {
+ if (has_interface<PPB_Flash_DRM_1_0>()) {
+ return get_interface<PPB_Flash_DRM_1_0>()->GetVoucherFile(
+ pp_resource(),
+ callback.output(),
+ callback.pp_completion_callback());
+ }
+ return PP_ERROR_FAILED;
+}
+
} // namespace flash
} // namespace pp