Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 class StatsObserver : public rtc::RefCountInterface { | 117 class StatsObserver : public rtc::RefCountInterface { |
| 118 public: | 118 public: |
| 119 virtual void OnComplete(const StatsReports& reports) = 0; | 119 virtual void OnComplete(const StatsReports& reports) = 0; |
| 120 | 120 |
| 121 protected: | 121 protected: |
| 122 virtual ~StatsObserver() {} | 122 virtual ~StatsObserver() {} |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 class MetricsObserverInterface : public rtc::RefCountInterface { | 125 class MetricsObserverInterface : public rtc::RefCountInterface { |
| 126 public: | 126 public: |
| 127 virtual void IncrementCounter(PeerConnectionMetricsCounter type) = 0; | 127 // TODO(guoweis): Remove this function once IncrementEnumCounter gets into |
| 128 // chromium. IncrementCounter only deals with one type of enumeration counter, | |
| 129 // i.e. PeerConnectionAddressFamilyCounter. Instead of creating a function for | |
| 130 // each enum type, IncrementEnumCounter is generalized with the enum type | |
| 131 // parameter. | |
| 132 virtual void IncrementCounter(PeerConnectionAddressFamilyCounter type) {} | |
| 133 | |
| 134 // |type| is the type of the enum counter to be incremented. |counter| | |
| 135 // is the particular counter in that type. |counter_max| is the next sequence | |
| 136 // number after the highest counter. | |
| 137 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type, | |
| 138 int counter, | |
| 139 int counter_max) {} | |
| 140 | |
| 128 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 141 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
| 129 int value) = 0; | 142 int value) = 0; |
| 130 // TODO(jbauch): Make method abstract when it is implemented by Chromium. | 143 // TODO(jbauch): Make method abstract when it is implemented by Chromium. |
| 131 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 144 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
| 132 const std::string& value) {} | 145 const std::string& value) {} |
| 133 | 146 |
| 134 protected: | 147 protected: |
| 135 virtual ~MetricsObserverInterface() {} | 148 virtual ~MetricsObserverInterface() {} |
| 136 }; | 149 }; |
| 137 | 150 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 enum IceConnectionState { | 184 enum IceConnectionState { |
| 172 kIceConnectionNew, | 185 kIceConnectionNew, |
| 173 kIceConnectionChecking, | 186 kIceConnectionChecking, |
| 174 kIceConnectionConnected, | 187 kIceConnectionConnected, |
| 175 kIceConnectionCompleted, | 188 kIceConnectionCompleted, |
| 176 kIceConnectionFailed, | 189 kIceConnectionFailed, |
| 177 kIceConnectionDisconnected, | 190 kIceConnectionDisconnected, |
| 178 kIceConnectionClosed, | 191 kIceConnectionClosed, |
| 179 }; | 192 }; |
| 180 | 193 |
| 194 const int kIceConnectionState_Max = kIceConnectionClosed + 1; | |
|
pthatcher1
2015/08/18 18:06:22
You could just put kIceConnectionStateMax at the e
guoweis_webrtc
2015/08/18 22:33:57
I was hesitant about this since all the states in
| |
| 195 | |
| 181 struct IceServer { | 196 struct IceServer { |
| 182 // TODO(jbauch): Remove uri when all code using it has switched to urls. | 197 // TODO(jbauch): Remove uri when all code using it has switched to urls. |
| 183 std::string uri; | 198 std::string uri; |
| 184 std::vector<std::string> urls; | 199 std::vector<std::string> urls; |
| 185 std::string username; | 200 std::string username; |
| 186 std::string password; | 201 std::string password; |
| 187 }; | 202 }; |
| 188 typedef std::vector<IceServer> IceServers; | 203 typedef std::vector<IceServer> IceServers; |
| 189 | 204 |
| 190 enum IceTransportsType { | 205 enum IceTransportsType { |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 627 CreatePeerConnectionFactory( | 642 CreatePeerConnectionFactory( |
| 628 rtc::Thread* worker_thread, | 643 rtc::Thread* worker_thread, |
| 629 rtc::Thread* signaling_thread, | 644 rtc::Thread* signaling_thread, |
| 630 AudioDeviceModule* default_adm, | 645 AudioDeviceModule* default_adm, |
| 631 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 646 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 632 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 647 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
| 633 | 648 |
| 634 } // namespace webrtc | 649 } // namespace webrtc |
| 635 | 650 |
| 636 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ | 651 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |