summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/host_resolver_resource.h
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 06:15:39 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 06:15:39 +0000
commit0edbfc86d6080cc7b3c65d3bd3e3867ab40d8e04 (patch)
tree174926eefd1cb8158325cee5cfc54667a81337cb /ppapi/proxy/host_resolver_resource.h
parentcce836eea3969a9cc3730098d2ab91847c3616a7 (diff)
downloadchromium_src-0edbfc86d6080cc7b3c65d3bd3e3867ab40d8e04.zip
chromium_src-0edbfc86d6080cc7b3c65d3bd3e3867ab40d8e04.tar.gz
chromium_src-0edbfc86d6080cc7b3c65d3bd3e3867ab40d8e04.tar.bz2
Introduce PPB_HostResolver_Dev.
This change exposes the PPB_HostResolver_Dev interface and makes it to share the same backend as PPB_HostResolver_Private. It doesn't include apps permission check, which will be implemented in separate CLs. BUG=247225 TEST=newly added test_host_resolver.{h,cc}. Review URL: https://chromiumcodereview.appspot.com/16727002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/host_resolver_resource.h')
-rw-r--r--ppapi/proxy/host_resolver_resource.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/ppapi/proxy/host_resolver_resource.h b/ppapi/proxy/host_resolver_resource.h
new file mode 100644
index 0000000..b39722b
--- /dev/null
+++ b/ppapi/proxy/host_resolver_resource.h
@@ -0,0 +1,43 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
+#define PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ppapi/proxy/host_resolver_resource_base.h"
+#include "ppapi/proxy/ppapi_proxy_export.h"
+#include "ppapi/thunk/ppb_host_resolver_api.h"
+
+namespace ppapi {
+namespace proxy {
+
+class PPAPI_PROXY_EXPORT HostResolverResource
+ : public HostResolverResourceBase,
+ public thunk::PPB_HostResolver_API {
+ public:
+ HostResolverResource(Connection connection, PP_Instance instance);
+ virtual ~HostResolverResource();
+
+ // PluginResource overrides.
+ virtual thunk::PPB_HostResolver_API* AsPPB_HostResolver_API() OVERRIDE;
+
+ // thunk::PPB_HostResolver_API implementation.
+ virtual int32_t Resolve(const char* host,
+ uint16_t port,
+ const PP_HostResolver_Hint_Dev* hint,
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
+ virtual PP_Var GetCanonicalName() OVERRIDE;
+ virtual uint32_t GetNetAddressCount() OVERRIDE;
+ virtual PP_Resource GetNetAddress(uint32_t index) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HostResolverResource);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_HOST_RESOLVER_RESOURCE_H_