1 // 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.
5 #include "ppapi/proxy/host_resolver_private_resource.h"
7 #include "ppapi/proxy/net_address_resource.h"
8 #include "ppapi/shared_impl/tracked_callback.h"
13 HostResolverPrivateResource::HostResolverPrivateResource(Connection connection
,
15 : HostResolverResourceBase(connection
, instance
, true) {
18 HostResolverPrivateResource::~HostResolverPrivateResource() {
21 thunk::PPB_HostResolver_Private_API
*
22 HostResolverPrivateResource::AsPPB_HostResolver_Private_API() {
26 int32_t HostResolverPrivateResource::Resolve(
29 const PP_HostResolver_Private_Hint
* hint
,
30 scoped_refptr
<TrackedCallback
> callback
) {
31 return ResolveImpl(host
, port
, hint
, callback
);
34 PP_Var
HostResolverPrivateResource::GetCanonicalName() {
35 return GetCanonicalNameImpl();
38 uint32_t HostResolverPrivateResource::GetSize() {
42 bool HostResolverPrivateResource::GetNetAddress(
44 PP_NetAddress_Private
* address
) {
48 scoped_refptr
<NetAddressResource
> addr_resource
= GetNetAddressImpl(index
);
49 if (!addr_resource
.get())
52 *address
= addr_resource
->GetNetAddressPrivate();