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.
5 #ifndef PPAPI_PROXY_FLASH_DRM_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_DRM_RESOURCE_H_
8 #include "ppapi/proxy/plugin_resource.h"
9 #include "ppapi/proxy/ppapi_proxy_export.h"
10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/ppb_flash_drm_api.h"
14 struct FileRefCreateInfo
;
20 class FlashDRMResource
21 : public PluginResource
,
22 public thunk::PPB_Flash_DRM_API
{
24 FlashDRMResource(Connection connection
,
25 PP_Instance instance
);
26 ~FlashDRMResource() override
;
29 thunk::PPB_Flash_DRM_API
* AsPPB_Flash_DRM_API() override
;
31 // PPB_Flash_DRM_API implementation.
32 int32_t GetDeviceID(PP_Var
* id
,
33 scoped_refptr
<TrackedCallback
> callback
) override
;
34 PP_Bool
GetHmonitor(int64_t* hmonitor
) override
;
35 int32_t GetVoucherFile(
36 PP_Resource
* file_ref
,
37 scoped_refptr
<TrackedCallback
> callback
) override
;
38 int32_t MonitorIsExternal(
40 scoped_refptr
<TrackedCallback
> callback
) override
;
43 void OnPluginMsgGetDeviceIDReply(PP_Var
* dest
,
44 scoped_refptr
<TrackedCallback
> callback
,
45 const ResourceMessageReplyParams
& params
,
46 const std::string
& id
);
47 void OnPluginMsgGetVoucherFileReply(PP_Resource
* dest
,
48 scoped_refptr
<TrackedCallback
> callback
,
49 const ResourceMessageReplyParams
& params
,
50 const FileRefCreateInfo
& file_info
);
51 void OnPluginMsgMonitorIsExternalReply(
53 scoped_refptr
<TrackedCallback
> callback
,
54 const ResourceMessageReplyParams
& params
,
57 DISALLOW_COPY_AND_ASSIGN(FlashDRMResource
);
63 #endif // PPAPI_PROXY_FLASH_DRM_RESOURCE_H_