Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: remoting/jingle_glue/chromium_port_allocator.h

Issue 390983003: Remove remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/DEPS ('k') | remoting/jingle_glue/chromium_port_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 REMOTING_JINGLE_GLUE_CHROMIUM_PORT_ALLOCATOR_H_
6 #define REMOTING_JINGLE_GLUE_CHROMIUM_PORT_ALLOCATOR_H_
7
8 #include <set>
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "third_party/libjingle/source/talk/p2p/client/httpportallocator.h"
13
14 namespace net {
15 class URLRequestContextGetter;
16 } // namespace net
17
18 namespace remoting {
19
20 struct NetworkSettings;
21
22 // An implementation of cricket::PortAllocator for libjingle that
23 // uses Chromium's network stack and configures itself according
24 // to the specified NetworkSettings.
25 class ChromiumPortAllocator : public cricket::HttpPortAllocatorBase {
26 public:
27 static scoped_ptr<ChromiumPortAllocator> Create(
28 const scoped_refptr<net::URLRequestContextGetter>& url_context,
29 const NetworkSettings& network_settings);
30
31 virtual ~ChromiumPortAllocator();
32
33 // cricket::HttpPortAllocatorBase overrides.
34 virtual cricket::PortAllocatorSession* CreateSessionInternal(
35 const std::string& content_name,
36 int component,
37 const std::string& ice_username_fragment,
38 const std::string& ice_password) OVERRIDE;
39
40 private:
41 ChromiumPortAllocator(
42 const scoped_refptr<net::URLRequestContextGetter>& url_context,
43 scoped_ptr<talk_base::NetworkManager> network_manager,
44 scoped_ptr<talk_base::PacketSocketFactory> socket_factory);
45
46 scoped_refptr<net::URLRequestContextGetter> url_context_;
47 scoped_ptr<talk_base::NetworkManager> network_manager_;
48 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_;
49
50 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocator);
51 };
52
53 } // namespace remoting
54
55 #endif // REMOTING_HOST_HOST_PORT_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/DEPS ('k') | remoting/jingle_glue/chromium_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698