OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "ppapi/proxy/plugin_resource.h" |
| 10 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 11 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" |
| 12 #include "ppapi/thunk/ppb_host_resolver_private_api.h" |
| 13 |
| 14 namespace ppapi { |
| 15 namespace proxy { |
| 16 |
| 17 class PPAPI_PROXY_EXPORT HostResolverPrivateResource |
| 18 : public PluginResource, |
| 19 public PPB_HostResolver_Shared { |
| 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_Shared implementation. |
| 30 virtual void SendResolve(const HostPortPair& host_port, |
| 31 const PP_HostResolver_Private_Hint* hint) OVERRIDE; |
| 32 |
| 33 private: |
| 34 // IPC message handlers. |
| 35 void OnPluginMsgResolveReply( |
| 36 const ResourceMessageReplyParams& params, |
| 37 bool succeeded, |
| 38 const std::string& canonical_name, |
| 39 const std::vector<PP_NetAddress_Private>& net_address_list); |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(HostResolverPrivateResource); |
| 42 }; |
| 43 |
| 44 } // namespace proxy |
| 45 } // namespace ppapi |
| 46 |
| 47 #endif // PPAPI_PROXY_HOST_RESOLVER_PRIVATE_RESOURCE_H_ |
OLD | NEW |