summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_host_resolver_private_proxy.h
blob: 7e9b719d1a84a6ba82855ec58bd22251a9fa84c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2012 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_PPB_HOST_RESOLVER_PRIVATE_PROXY_H_
#define PPAPI_PROXY_PPB_HOST_RESOLVER_PRIVATE_PROXY_H_

#include "base/basictypes.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/proxy/interface_proxy.h"
#include "ppapi/shared_impl/private/ppb_host_resolver_shared.h"

namespace ppapi {
namespace proxy {

class PPB_HostResolver_Private_Proxy : public InterfaceProxy {
 public:
  PPB_HostResolver_Private_Proxy(Dispatcher* dispatcher);
  virtual~PPB_HostResolver_Private_Proxy();

  static PP_Resource CreateProxyResource(PP_Instance instance);

  // InterfaceProxy implementation.
  virtual bool OnMessageReceived(const IPC::Message& msg);

  static const ApiID kApiID = API_ID_PPB_HOSTRESOLVER_PRIVATE;

 private:
  // Browser->plugin message handlers.
  void OnMsgResolveACK(
      uint32 plugin_dispatcher_id,
      uint32 host_resolver_id,
      bool succeeded,
      const std::string& canonical_name,
      const std::vector<PP_NetAddress_Private>& net_address_list);

  DISALLOW_COPY_AND_ASSIGN(PPB_HostResolver_Private_Proxy);
};

}  // namespace proxy
}  // namespace ppapi

#endif  // PPAPI_PROXY_PPB_HOST_RESOLVER_PRIVATE_PROXY_H_