Avi Drissman | db497b3 | 2022-09-15 19:47:28 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 2 | // 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] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 8 | #include "base/compiler_specific.h" |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 9 | #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 | |||||
15 | namespace ppapi { | ||||
16 | namespace proxy { | ||||
17 | |||||
18 | class PPAPI_PROXY_EXPORT URLResponseInfoResource | ||||
19 | : public PluginResource, | ||||
Nico Weber | 43ddd7a3 | 2017-08-15 19:19:27 | [diff] [blame] | 20 | public thunk::PPB_URLResponseInfo_API { |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 21 | public: |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 22 | URLResponseInfoResource(Connection connection, |
23 | PP_Instance instance, | ||||
Marijn Kruisselbrink | 9ebd7ba | 2018-06-11 23:18:04 | [diff] [blame] | 24 | const URLResponseInfoData& data); |
Peter Boström | 3d5b3cb | 2021-09-23 21:35:45 | [diff] [blame] | 25 | |
26 | URLResponseInfoResource(const URLResponseInfoResource&) = delete; | ||||
27 | URLResponseInfoResource& operator=(const URLResponseInfoResource&) = delete; | ||||
28 | |||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 29 | ~URLResponseInfoResource() override; |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 30 | |
31 | // Resource override. | ||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 32 | PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() override; |
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 33 | |
34 | // PPB_URLResponseInfo_API implementation. | ||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 35 | PP_Var GetProperty(PP_URLResponseProperty property) override; |
36 | PP_Resource GetBodyAsFileRef() override; | ||||
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 37 | |
[email protected] | 47cb253f | 2013-05-16 01:50:40 | [diff] [blame] | 38 | const URLResponseInfoData& data() const { return data_; } |
39 | |||||
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 40 | private: |
41 | URLResponseInfoData data_; | ||||
[email protected] | 844fecb | 2012-11-16 20:11:06 | [diff] [blame] | 42 | }; |
43 | |||||
44 | } // namespace proxy | ||||
45 | } // namespace ppapi | ||||
46 | |||||
47 | #endif // PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_ |