blob: 81aa65103dffc2e2c16f74109d69d71ab4c807be [file] [log] [blame]
[email protected]844fecb2012-11-16 20:11:061// 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.
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"
avie029c4132015-12-23 06:45:229#include "base/macros.h"
[email protected]844fecb2012-11-16 20:11:0610#include "ppapi/proxy/plugin_resource.h"
11#include "ppapi/proxy/ppapi_proxy_export.h"
12#include "ppapi/shared_impl/scoped_pp_resource.h"
13#include "ppapi/shared_impl/url_response_info_data.h"
14#include "ppapi/thunk/ppb_url_response_info_api.h"
15
16namespace ppapi {
17namespace proxy {
18
19class PPAPI_PROXY_EXPORT URLResponseInfoResource
20 : public PluginResource,
Nico Weber43ddd7a32017-08-15 19:19:2721 public thunk::PPB_URLResponseInfo_API {
[email protected]844fecb2012-11-16 20:11:0622 public:
[email protected]844fecb2012-11-16 20:11:0623 URLResponseInfoResource(Connection connection,
24 PP_Instance instance,
Marijn Kruisselbrink9ebd7ba2018-06-11 23:18:0425 const URLResponseInfoData& data);
Peter Boström3d5b3cb2021-09-23 21:35:4526
27 URLResponseInfoResource(const URLResponseInfoResource&) = delete;
28 URLResponseInfoResource& operator=(const URLResponseInfoResource&) = delete;
29
nicke4784432015-04-23 14:01:4830 ~URLResponseInfoResource() override;
[email protected]844fecb2012-11-16 20:11:0631
32 // Resource override.
nicke4784432015-04-23 14:01:4833 PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() override;
[email protected]844fecb2012-11-16 20:11:0634
35 // PPB_URLResponseInfo_API implementation.
nicke4784432015-04-23 14:01:4836 PP_Var GetProperty(PP_URLResponseProperty property) override;
37 PP_Resource GetBodyAsFileRef() override;
[email protected]844fecb2012-11-16 20:11:0638
[email protected]47cb253f2013-05-16 01:50:4039 const URLResponseInfoData& data() const { return data_; }
40
[email protected]844fecb2012-11-16 20:11:0641 private:
42 URLResponseInfoData data_;
[email protected]844fecb2012-11-16 20:11:0643};
44
45} // namespace proxy
46} // namespace ppapi
47
48#endif // PPAPI_PROXY_URL_RESPONSE_INFO_RESOURCE_H_