Chromium Code Reviews| Index: remoting/protocol/port_allocator_factory_interface.h |
| diff --git a/remoting/protocol/port_allocator_factory_interface.h b/remoting/protocol/port_allocator_factory_interface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9be884f98e94e6f4d9e6fb4ed92420f627bb6fbd |
| --- /dev/null |
| +++ b/remoting/protocol/port_allocator_factory_interface.h |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2015 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_PROTOCOL_PORT_ALLOCATOR_FACTORY_INTERFACE_H_ |
| +#define REMOTING_PROTOCOL_PORT_ALLOCATOR_FACTORY_INTERFACE_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "third_party/webrtc/p2p/base/portallocator.h" |
| + |
| +// Factory class used for creating cricket::PortAllocator that is used |
| +// for ICE negotiation. |
| +class PortAllocatorFactoryInterface |
|
Sergey Ulanov
2015/12/08 16:59:43
Please put this in remoting::protocol namespace. A
Taylor_Brandstetter
2015/12/08 21:02:59
Done.
|
| + : public base::RefCounted<PortAllocatorFactoryInterface> { |
|
Sergey Ulanov
2015/12/08 16:59:43
I don't think we need it to be ref-counted. Just p
Taylor_Brandstetter
2015/12/08 21:02:59
But won't every WebrtcTransport (as well as the We
Sergey Ulanov
2015/12/09 20:55:22
Yes, TransportFactory is required to outlive all T
|
| + public: |
| + virtual cricket::PortAllocator* CreatePortAllocator() = 0; |
| + |
| + protected: |
| + PortAllocatorFactoryInterface() {} |
| + virtual ~PortAllocatorFactoryInterface() {} |
| + |
| + friend class base::RefCounted<PortAllocatorFactoryInterface>; |
| +}; |
| + |
| +#endif // REMOTING_PROTOCOL_PORT_ALLOCATOR_FACTORY_INTERFACE_H_ |