pepper_packet_socket_factory.h revision b2df76ea8fec9e32f6f3718986dba0d95315b29c
1c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org// Use of this source code is governed by a BSD-style license that can be
3c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org// found in the LICENSE file.
4c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
5c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#ifndef REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
6c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#define REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
7c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
8c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#include "base/compiler_specific.h"
9c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#include "ppapi/cpp/instance_handle.h"
10c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#include "third_party/libjingle/source/talk/p2p/base/packetsocketfactory.h"
11c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
12c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.orgnamespace remoting {
13c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
14c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.orgclass PepperPacketSocketFactory : public talk_base::PacketSocketFactory {
15c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org public:
16c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  explicit PepperPacketSocketFactory(const pp::InstanceHandle& instance);
17c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  virtual ~PepperPacketSocketFactory();
18c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
19c8263e704135436f71a585801966294d6deadeebepoger@google.com  virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
20c8263e704135436f71a585801966294d6deadeebepoger@google.com      const talk_base::SocketAddress& local_address,
21c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      int min_port, int max_port) OVERRIDE;
22c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
23c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      const talk_base::SocketAddress& local_address,
24c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      int min_port,
25c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      int max_port,
26c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      int opts) OVERRIDE;
27c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
28c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      const talk_base::SocketAddress& local_address,
29f539318f0d3dba743ec1886d5d9df0fb1be628a1tfarina      const talk_base::SocketAddress& remote_address,
30c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      const talk_base::ProxyInfo& proxy_info,
31c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      const std::string& user_agent,
32c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org      int opts) OVERRIDE;
33c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
34c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org private:
35c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  const pp::InstanceHandle pp_instance_;
36c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
37c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org  DISALLOW_COPY_AND_ASSIGN(PepperPacketSocketFactory);
38c8263e704135436f71a585801966294d6deadeebepoger@google.com};
39c8263e704135436f71a585801966294d6deadeebepoger@google.com
40c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org}  // namespace remoting
41c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org
42c61c3c310185f6ffaefce194a079159423945191commit-bot@chromium.org#endif  // REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
43c8263e704135436f71a585801966294d6deadeebepoger@google.com