| OLD | NEW |
| 1 /* | 1 // TODO(pthatcher): Remove this file once Chrome's build files no |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 // longer refer to it. |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #include <string> | |
| 12 | |
| 13 #include "webrtc/p2p/base/rawtransport.h" | |
| 14 #include "webrtc/p2p/base/rawtransportchannel.h" | |
| 15 #include "webrtc/base/common.h" | |
| 16 | |
| 17 #if defined(FEATURE_ENABLE_PSTN) | |
| 18 namespace cricket { | |
| 19 | |
| 20 RawTransport::RawTransport(rtc::Thread* signaling_thread, | |
| 21 rtc::Thread* worker_thread, | |
| 22 const std::string& content_name, | |
| 23 PortAllocator* allocator) | |
| 24 : Transport(signaling_thread, worker_thread, | |
| 25 content_name, NS_GINGLE_RAW, allocator) { | |
| 26 } | |
| 27 | |
| 28 RawTransport::~RawTransport() { | |
| 29 DestroyAllChannels(); | |
| 30 } | |
| 31 | |
| 32 TransportChannelImpl* RawTransport::CreateTransportChannel(int component) { | |
| 33 return new RawTransportChannel(content_name(), component, this, | |
| 34 worker_thread(), | |
| 35 port_allocator()); | |
| 36 } | |
| 37 | |
| 38 void RawTransport::DestroyTransportChannel(TransportChannelImpl* channel) { | |
| 39 delete channel; | |
| 40 } | |
| 41 | |
| 42 } // namespace cricket | |
| 43 #endif // defined(FEATURE_ENABLE_PSTN) | |
| OLD | NEW |