blob: 034b741ee7861c261c24052b1493d03a53627ea1 [file] [log] [blame]
[email protected]0edbfc82013-06-14 06:15:391// 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.
4
5#ifndef PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
6#define PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
7
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
[email protected]0edbfc82013-06-14 06:15:3910#include "base/compiler_specific.h"
avie029c4132015-12-23 06:45:2211#include "base/macros.h"
[email protected]0edbfc82013-06-14 06:15:3912#include "ppapi/proxy/host_resolver_resource_base.h"
13#include "ppapi/proxy/ppapi_proxy_export.h"
14#include "ppapi/thunk/ppb_host_resolver_api.h"
15
16namespace ppapi {
17namespace proxy {
18
19class PPAPI_PROXY_EXPORT HostResolverResource
20 : public HostResolverResourceBase,
21 public thunk::PPB_HostResolver_API {
22 public:
23 HostResolverResource(Connection connection, PP_Instance instance);
nicke4784432015-04-23 14:01:4824 ~HostResolverResource() override;
[email protected]0edbfc82013-06-14 06:15:3925
26 // PluginResource overrides.
nicke4784432015-04-23 14:01:4827 thunk::PPB_HostResolver_API* AsPPB_HostResolver_API() override;
[email protected]0edbfc82013-06-14 06:15:3928
29 // thunk::PPB_HostResolver_API implementation.
nicke4784432015-04-23 14:01:4830 int32_t Resolve(const char* host,
31 uint16_t port,
32 const PP_HostResolver_Hint* hint,
33 scoped_refptr<TrackedCallback> callback) override;
34 PP_Var GetCanonicalName() override;
35 uint32_t GetNetAddressCount() override;
36 PP_Resource GetNetAddress(uint32_t index) override;
[email protected]0edbfc82013-06-14 06:15:3937
38 private:
39 DISALLOW_COPY_AND_ASSIGN(HostResolverResource);
40};
41
42} // namespace proxy
43} // namespace ppapi
44
45#endif // PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_