blob: 8281a1f9d3ca545db0e4970fbb41c39d085fa46c [file] [log] [blame]
[email protected]6a685372013-02-12 12:50:461// 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_HOST_RESOLVER_PRIVATE_RESOURCE_H_
6#define PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_
7
[email protected]6a685372013-02-12 12:50:468#include "base/basictypes.h"
9#include "base/compiler_specific.h"
[email protected]0edbfc82013-06-14 06:15:3910#include "ppapi/proxy/host_resolver_resource_base.h"
[email protected]6a685372013-02-12 12:50:4611#include "ppapi/proxy/ppapi_proxy_export.h"
[email protected]6a685372013-02-12 12:50:4612#include "ppapi/thunk/ppb_host_resolver_private_api.h"
13
14namespace ppapi {
[email protected]6a685372013-02-12 12:50:4615namespace proxy {
16
17class PPAPI_PROXY_EXPORT HostResolverPrivateResource
[email protected]0edbfc82013-06-14 06:15:3918 : public HostResolverResourceBase,
[email protected]6a685372013-02-12 12:50:4619 public thunk::PPB_HostResolver_Private_API {
20 public:
21 HostResolverPrivateResource(Connection connection,
22 PP_Instance instance);
23 virtual ~HostResolverPrivateResource();
24
25 // PluginResource overrides.
26 virtual thunk::PPB_HostResolver_Private_API*
27 AsPPB_HostResolver_Private_API() OVERRIDE;
28
29 // PPB_HostResolver_Private_API implementation.
30 virtual int32_t Resolve(const char* host,
31 uint16_t port,
32 const PP_HostResolver_Private_Hint* hint,
33 scoped_refptr<TrackedCallback> callback) OVERRIDE;
34 virtual PP_Var GetCanonicalName() OVERRIDE;
35 virtual uint32_t GetSize() OVERRIDE;
36 virtual bool GetNetAddress(uint32_t index,
37 PP_NetAddress_Private* address) OVERRIDE;
38
39 private:
[email protected]6a685372013-02-12 12:50:4640 DISALLOW_COPY_AND_ASSIGN(HostResolverPrivateResource);
41};
42
43} // namespace proxy
44} // namespace ppapi
45
46#endif // PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_