diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 20:40:14 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 20:40:14 +0000 |
commit | 83693230e20bb82dc2bc04295965a42bf05bfa23 (patch) | |
tree | 2f6eabc2e3af9aa4da126f72b350aa0aa59bbb94 /remoting/jingle_glue/chromium_socket_factory.h | |
parent | 40ec16582dd631888a3c8473c0aff56b23b6dc41 (diff) | |
download | chromium_src-83693230e20bb82dc2bc04295965a42bf05bfa23.zip chromium_src-83693230e20bb82dc2bc04295965a42bf05bfa23.tar.gz chromium_src-83693230e20bb82dc2bc04295965a42bf05bfa23.tar.bz2 |
Implement ChromiumSocketFactory.
The new PacketSocketFactory will be used by chromoting host in order to be able to
use chromium UDP sockets instead of libjingle sockets
BUG=137140
Review URL: https://chromiumcodereview.appspot.com/10783028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/chromium_socket_factory.h')
-rw-r--r-- | remoting/jingle_glue/chromium_socket_factory.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/remoting/jingle_glue/chromium_socket_factory.h b/remoting/jingle_glue/chromium_socket_factory.h new file mode 100644 index 0000000..f142ad2 --- /dev/null +++ b/remoting/jingle_glue/chromium_socket_factory.h @@ -0,0 +1,38 @@ +// 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_JINGLE_GLUE_CHROMIUM_SOCKET_FACTORY_H_ +#define REMOTING_JINGLE_GLUE_CHROMIUM_SOCKET_FACTORY_H_ + +#include "base/compiler_specific.h" +#include "third_party/libjingle/source/talk/base/packetsocketfactory.h" + +namespace remoting { + +class ChromiumPacketSocketFactory : public talk_base::PacketSocketFactory { + public: + explicit ChromiumPacketSocketFactory(); + virtual ~ChromiumPacketSocketFactory(); + + 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: + DISALLOW_COPY_AND_ASSIGN(ChromiumPacketSocketFactory); +}; + +} // namespace remoting + +#endif // REMOTING_JINGLE_GLUE_CHROMIUM_SOCKET_FACTORY_H_ |