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_PLATFORM_VERIFICATION_PRIVATE_RESOURCE_H_
6 #define PPAPI_PROXY_PLATFORM_VERIFICATION_PRIVATE_RESOURCE_H_
8 #include "ppapi/proxy/plugin_resource.h"
9 #include "ppapi/proxy/ppapi_proxy_export.h"
10 #include "ppapi/thunk/ppb_platform_verification_api.h"
15 class PPAPI_PROXY_EXPORT PlatformVerificationPrivateResource
16 : public PluginResource
,
17 public thunk::PPB_PlatformVerification_API
{
19 PlatformVerificationPrivateResource(Connection connection
,
20 PP_Instance instance
);
23 struct ChallengePlatformParams
{
25 PP_Var
* signed_data_signature
;
26 PP_Var
* platform_key_certificate
;
27 scoped_refptr
<TrackedCallback
> callback
;
30 ~PlatformVerificationPrivateResource() override
;
32 // PluginResource overrides.
33 thunk::PPB_PlatformVerification_API
* AsPPB_PlatformVerification_API()
36 // PPB_PlatformVerification_API implementation.
37 int32_t ChallengePlatform(
38 const PP_Var
& service_id
,
39 const PP_Var
& challenge
,
41 PP_Var
* signed_data_signature
,
42 PP_Var
* platform_key_certificate
,
43 const scoped_refptr
<TrackedCallback
>& callback
) override
;
44 void OnChallengePlatformReply(
45 ChallengePlatformParams output_params
,
46 const ResourceMessageReplyParams
& params
,
47 const std::vector
<uint8_t>& raw_signed_data
,
48 const std::vector
<uint8_t>& raw_signed_data_signature
,
49 const std::string
& raw_platform_key_certificate
);
51 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationPrivateResource
);
57 #endif // PPAPI_PROXY_PLATFORM_VERIFICATION_PRIVATE_RESOURCE_H_