| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2010 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 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 std::string(), | 56 std::string(), |
| 57 false)); | 57 false)); |
| 58 AddPort(port_.get()); | 58 AddPort(port_.get()); |
| 59 } | 59 } |
| 60 ++port_config_count_; | 60 ++port_config_count_; |
| 61 running_ = true; | 61 running_ = true; |
| 62 } | 62 } |
| 63 | 63 |
| 64 virtual void StopGettingPorts() { running_ = false; } | 64 virtual void StopGettingPorts() { running_ = false; } |
| 65 virtual bool IsGettingPorts() { return running_; } | 65 virtual bool IsGettingPorts() { return running_; } |
| 66 virtual void ClearGettingPorts() {} |
| 67 |
| 66 int port_config_count() { return port_config_count_; } | 68 int port_config_count() { return port_config_count_; } |
| 67 | 69 |
| 68 void AddPort(cricket::Port* port) { | 70 void AddPort(cricket::Port* port) { |
| 69 port->set_component(component_); | 71 port->set_component(component_); |
| 70 port->set_generation(0); | 72 port->set_generation(0); |
| 71 port->SignalPortComplete.connect( | 73 port->SignalPortComplete.connect( |
| 72 this, &FakePortAllocatorSession::OnPortComplete); | 74 this, &FakePortAllocatorSession::OnPortComplete); |
| 73 port->PrepareAddress(); | 75 port->PrepareAddress(); |
| 74 SignalPortReady(this, port); | 76 SignalPortReady(this, port); |
| 75 } | 77 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 112 |
| 111 private: | 113 private: |
| 112 rtc::Thread* worker_thread_; | 114 rtc::Thread* worker_thread_; |
| 113 rtc::PacketSocketFactory* factory_; | 115 rtc::PacketSocketFactory* factory_; |
| 114 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> owned_factory_; | 116 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> owned_factory_; |
| 115 }; | 117 }; |
| 116 | 118 |
| 117 } // namespace cricket | 119 } // namespace cricket |
| 118 | 120 |
| 119 #endif // WEBRTC_P2P_CLIENT_FAKEPORTALLOCATOR_H_ | 121 #endif // WEBRTC_P2P_CLIENT_FAKEPORTALLOCATOR_H_ |
| OLD | NEW |