Roll src/third_party/WebKit ef7cfd7:80927b2 (svn 194570:194575)
[chromium-blink-merge.git] / ppapi / c / private / ppb_flash_drm.h
blob62f7226b9f7031f1f2e234f4133912964937186d
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
6 /* From private/ppb_flash_drm.idl modified Mon Nov 11 14:49:53 2013. */
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_
9 #define PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h"
19 #define PPB_FLASH_DRM_INTERFACE_1_0 "PPB_Flash_DRM;1.0"
20 #define PPB_FLASH_DRM_INTERFACE_1_1 "PPB_Flash_DRM;1.1"
21 #define PPB_FLASH_DRM_INTERFACE PPB_FLASH_DRM_INTERFACE_1_1
23 /**
24 * @file
25 * This file contains the <code>PPB_Flash_DRM</code> interface.
29 /**
30 * @addtogroup Interfaces
31 * @{
33 /**
34 * A resource for performing Flash DRM-related operations.
36 struct PPB_Flash_DRM_1_1 {
37 /**
38 * Creates a PPB_Flash_DRM resource for performing DRM-related operations in
39 * Flash.
41 PP_Resource (*Create)(PP_Instance instance);
42 /**
43 * Asynchronously computes the device ID. When available, it will place the
44 * string in |*id| and will call the completion callback. On failure the
45 * given var will be PP_VARTYPE_UNDEFINED.
47 int32_t (*GetDeviceID)(PP_Resource drm,
48 struct PP_Var* id,
49 struct PP_CompletionCallback callback);
50 /**
51 * Windows and Mac only. Synchronously outputs the HMONITOR or
52 * CGDirectDisplayID corresponding to the monitor on which the plugin instance
53 * is displayed in |hmonitor|. This value is queried asynchronously and this
54 * will return PP_FALSE if the value is not yet available or an error
55 * occurred. PP_TRUE is returned on success.
57 PP_Bool (*GetHmonitor)(PP_Resource drm, int64_t* hmonitor);
58 /**
59 * Asynchronously returns a PPB_FileRef resource in |file_ref| which points to
60 * the Voucher file for performing DRM verification. |callback| will be called
61 * upon completion.
63 int32_t (*GetVoucherFile)(PP_Resource drm,
64 PP_Resource* file_ref,
65 struct PP_CompletionCallback callback);
66 /**
67 * Asynchronously returns a value indicating whether the monitor on which the
68 * plugin instance is displayed is external. |callback| will be called upon
69 * completion.
71 int32_t (*MonitorIsExternal)(PP_Resource drm,
72 PP_Bool* is_external,
73 struct PP_CompletionCallback callback);
76 typedef struct PPB_Flash_DRM_1_1 PPB_Flash_DRM;
78 struct PPB_Flash_DRM_1_0 {
79 PP_Resource (*Create)(PP_Instance instance);
80 int32_t (*GetDeviceID)(PP_Resource drm,
81 struct PP_Var* id,
82 struct PP_CompletionCallback callback);
83 PP_Bool (*GetHmonitor)(PP_Resource drm, int64_t* hmonitor);
84 int32_t (*GetVoucherFile)(PP_Resource drm,
85 PP_Resource* file_ref,
86 struct PP_CompletionCallback callback);
88 /**
89 * @}
92 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_ */