1 // Copyright 2013 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_OUTPUT_PROTECTION_RESOURCE_H_
6 #define PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_
8 #include "base/compiler_specific.h"
9 #include "ppapi/c/private/ppb_output_protection_private.h"
10 #include "ppapi/proxy/device_enumeration_resource_helper.h"
11 #include "ppapi/proxy/plugin_resource.h"
12 #include "ppapi/thunk/ppb_output_protection_api.h"
17 class OutputProtectionResource
18 : public PluginResource
,
19 public ::ppapi::thunk::PPB_OutputProtection_API
{
21 OutputProtectionResource(Connection connection
,
22 PP_Instance instance
);
25 ~OutputProtectionResource() override
;
27 // PluginResource overrides.
28 thunk::PPB_OutputProtection_API
* AsPPB_OutputProtection_API() override
;
30 // PPB_OutputProtection_API implementation.
33 uint32_t* protection_mask
,
34 const scoped_refptr
<TrackedCallback
>& callback
) override
;
35 int32_t EnableProtection(
36 uint32_t desired_method_mask
,
37 const scoped_refptr
<TrackedCallback
>& callback
) override
;
39 void OnPluginMsgQueryStatusReply(
40 uint32_t* out_link_mask
,
41 uint32_t* out_protection_mask
,
42 const ResourceMessageReplyParams
& params
,
44 uint32_t protection_mask
);
45 void OnPluginMsgEnableProtectionReply(
46 const ResourceMessageReplyParams
& params
);
48 scoped_refptr
<TrackedCallback
> query_status_callback_
;
49 scoped_refptr
<TrackedCallback
> enable_protection_callback_
;
51 DISALLOW_COPY_AND_ASSIGN(OutputProtectionResource
);
57 #endif // PPAPI_PROXY_OUTPUT_PROTECTION_RESOURCE_H_