Commit 0a133c0a authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Implement PepperPacketSocketFactory.

Then new PepperPacketSocketFactory implements talk_base::PacketSocketFactory
based on Pepper's UDP sockets interface.

BUG=109630


Review URL: http://codereview.chromium.org/10121002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133859 0039d316-1c4b-4281-b951-d872f2087c98
parent b6f38623
This diff is collapsed.
// 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 REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
#define REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
#include "ppapi/cpp/instance_handle.h"
#include "third_party/libjingle/source/talk/base/packetsocketfactory.h"
namespace remoting {
class PepperPacketSocketFactory : public talk_base::PacketSocketFactory {
public:
explicit PepperPacketSocketFactory(const pp::InstanceHandle& instance);
virtual ~PepperPacketSocketFactory();
virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
const talk_base::SocketAddress& local_address,
int min_port, int max_port) OVERRIDE;
virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
const talk_base::SocketAddress& local_address,
int min_port,
int max_port,
bool ssl) OVERRIDE;
virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address,
const talk_base::ProxyInfo& proxy_info,
const std::string& user_agent,
bool ssl) OVERRIDE;
private:
const pp::InstanceHandle pp_instance_;
DISALLOW_COPY_AND_ASSIGN(PepperPacketSocketFactory);
};
} // namespace remoting
#endif // REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_
...@@ -585,6 +585,8 @@ ...@@ -585,6 +585,8 @@
'client/plugin/pepper_input_handler.h', 'client/plugin/pepper_input_handler.h',
'client/plugin/pepper_network_manager.cc', 'client/plugin/pepper_network_manager.cc',
'client/plugin/pepper_network_manager.h', 'client/plugin/pepper_network_manager.h',
'client/plugin/pepper_packet_socket_factory.cc',
'client/plugin/pepper_packet_socket_factory.h',
'client/plugin/pepper_plugin_thread_delegate.cc', 'client/plugin/pepper_plugin_thread_delegate.cc',
'client/plugin/pepper_plugin_thread_delegate.h', 'client/plugin/pepper_plugin_thread_delegate.h',
'client/plugin/pepper_view.cc', 'client/plugin/pepper_view.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment