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

Side by Side Diff: webrtc/p2p/base/rawtransport.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Set media engine on voice channel Created 5 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "webrtc/p2p/base/rawtransport.h" 13 #include "webrtc/p2p/base/rawtransport.h"
14 #include "webrtc/p2p/base/rawtransportchannel.h" 14 #include "webrtc/p2p/base/rawtransportchannel.h"
15 #include "webrtc/base/common.h" 15 #include "webrtc/base/common.h"
16 16
17 #if defined(FEATURE_ENABLE_PSTN) 17 #if defined(FEATURE_ENABLE_PSTN)
18 namespace cricket { 18 namespace cricket {
19 19
20 RawTransport::RawTransport(rtc::Thread* signaling_thread, 20 RawTransport::RawTransport(const std::string& content_name,
21 rtc::Thread* worker_thread,
22 const std::string& content_name,
23 PortAllocator* allocator) 21 PortAllocator* allocator)
24 : Transport(signaling_thread, worker_thread, 22 : Transport(content_name, NS_GINGLE_RAW, allocator) {
25 content_name, NS_GINGLE_RAW, allocator) {
26 } 23 }
27 24
28 RawTransport::~RawTransport() { 25 RawTransport::~RawTransport() {
29 DestroyAllChannels(); 26 DestroyAllChannels();
30 } 27 }
31 28
32 TransportChannelImpl* RawTransport::CreateTransportChannel(int component) { 29 TransportChannelImpl* RawTransport::CreateTransportChannel(int component) {
33 return new RawTransportChannel(content_name(), component, this, 30 return new RawTransportChannel(content_name(), component, this,
34 worker_thread(),
35 port_allocator()); 31 port_allocator());
36 } 32 }
37 33
38 void RawTransport::DestroyTransportChannel(TransportChannelImpl* channel) { 34 void RawTransport::DestroyTransportChannel(TransportChannelImpl* channel) {
39 delete channel; 35 delete channel;
40 } 36 }
41 37
42 } // namespace cricket 38 } // namespace cricket
43 #endif // defined(FEATURE_ENABLE_PSTN) 39 #endif // defined(FEATURE_ENABLE_PSTN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698