blob: d9455744710ff4ad1070922ed2165726704050cb [file] [log] [blame]
Avi Drissmandb497b32022-09-15 19:47:281// Copyright 2012 The Chromium Authors
[email protected]844fecb2012-11-16 20:11:062// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_
6#define PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_
7
[email protected]844fecb2012-11-16 20:11:068#include "base/compiler_specific.h"
[email protected]844fecb2012-11-16 20:11:069#include "ppapi/proxy/plugin_resource.h"
10#include "ppapi/proxy/ppapi_proxy_export.h"
11#include "ppapi/shared_impl/scoped_pp_resource.h"
12#include "ppapi/shared_impl/url_response_info_data.h"
13#include "ppapi/thunk/ppb_url_response_info_api.h"
14
15namespace ppapi {
16namespace proxy {
17
18class PPAPI_PROXY_EXPORT URLResponseInfoResource
19 : public PluginResource,
Nico Weber43ddd7a32017-08-15 19:19:2720 public thunk::PPB_URLResponseInfo_API {
[email protected]844fecb2012-11-16 20:11:0621 public:
[email protected]844fecb2012-11-16 20:11:0622 URLResponseInfoResource(Connection connection,
23 PP_Instance instance,
Marijn Kruisselbrink9ebd7ba2018-06-11 23:18:0424 const URLResponseInfoData& data);
Peter Boström3d5b3cb2021-09-23 21:35:4525
26 URLResponseInfoResource(const URLResponseInfoResource&) = delete;
27 URLResponseInfoResource& operator=(const URLResponseInfoResource&) = delete;
28
nicke4784432015-04-23 14:01:4829 ~URLResponseInfoResource() override;
[email protected]844fecb2012-11-16 20:11:0630
31 // Resource override.
nicke4784432015-04-23 14:01:4832 PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() override;
[email protected]844fecb2012-11-16 20:11:0633
34 // PPB_URLResponseInfo_API implementation.
nicke4784432015-04-23 14:01:4835 PP_Var GetProperty(PP_URLResponseProperty property) override;
36 PP_Resource GetBodyAsFileRef() override;
[email protected]844fecb2012-11-16 20:11:0637
[email protected]47cb253f2013-05-16 01:50:4038 const URLResponseInfoData& data() const { return data_; }
39
[email protected]844fecb2012-11-16 20:11:0640 private:
41 URLResponseInfoData data_;
[email protected]844fecb2012-11-16 20:11:0642};
43
44} // namespace proxy
45} // namespace ppapi
46
47#endif // PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_