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

Side by Side Diff: remoting/client/plugin/pepper_port_allocator.h

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_ 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ppapi/cpp/instance_handle.h" 10 #include "ppapi/cpp/instance_handle.h"
11 #include "remoting/protocol/port_allocator_factory.h"
11 #include "third_party/webrtc/p2p/client/httpportallocator.h" 12 #include "third_party/webrtc/p2p/client/httpportallocator.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 15
15 // An implementation of cricket::PortAllocator for libjingle that is 16 // An implementation of cricket::PortAllocator for libjingle that is
16 // used by the client plugin. There are two differences from 17 // used by the client plugin. There are two differences from
17 // cricket::HttpPortAllocator: 18 // cricket::HttpPortAllocator:
18 // * PepperPortAllocator uses Pepper URLLoader API when creating 19 // * PepperPortAllocator uses Pepper URLLoader API when creating
19 // relay sessions. 20 // relay sessions.
20 // * PepperPortAllocator resolves STUN DNS names and passes IP 21 // * PepperPortAllocator resolves STUN DNS names and passes IP
(...skipping 19 matching lines...) Expand all
40 scoped_ptr<rtc::NetworkManager> network_manager, 41 scoped_ptr<rtc::NetworkManager> network_manager,
41 scoped_ptr<rtc::PacketSocketFactory> socket_factory); 42 scoped_ptr<rtc::PacketSocketFactory> socket_factory);
42 43
43 pp::InstanceHandle instance_; 44 pp::InstanceHandle instance_;
44 scoped_ptr<rtc::NetworkManager> network_manager_; 45 scoped_ptr<rtc::NetworkManager> network_manager_;
45 scoped_ptr<rtc::PacketSocketFactory> socket_factory_; 46 scoped_ptr<rtc::PacketSocketFactory> socket_factory_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(PepperPortAllocator); 48 DISALLOW_COPY_AND_ASSIGN(PepperPortAllocator);
48 }; 49 };
49 50
51 class PepperPortAllocatorFactory : public protocol::PortAllocatorFactory {
52 public:
53 PepperPortAllocatorFactory(const pp::InstanceHandle& instance);
54 ~PepperPortAllocatorFactory() override;
55
56 // PortAllocatorFactory interface.
57 scoped_ptr<cricket::HttpPortAllocatorBase> CreatePortAllocator() override;
58
59 private:
60 pp::InstanceHandle instance_;
61
62 DISALLOW_COPY_AND_ASSIGN(PepperPortAllocatorFactory);
63 };
64
50 } // namespace remoting 65 } // namespace remoting
51 66
52 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_ 67 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698