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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 int sdp_mline_index_; | 63 int sdp_mline_index_; |
| 64 cricket::Candidate candidate_; | 64 cricket::Candidate candidate_; |
| 65 | 65 |
| 66 RTC_DISALLOW_COPY_AND_ASSIGN(JsepIceCandidate); | 66 RTC_DISALLOW_COPY_AND_ASSIGN(JsepIceCandidate); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Implementation of IceCandidateCollection. | 69 // Implementation of IceCandidateCollection. |
| 70 // This implementation stores JsepIceCandidates. | 70 // This implementation stores JsepIceCandidates. |
| 71 class JsepCandidateCollection : public IceCandidateCollection { | 71 class JsepCandidateCollection : public IceCandidateCollection { |
| 72 public: | 72 public: |
| 73 JsepCandidateCollection() {} | |
| 74 JsepCandidateCollection(JsepCandidateCollection&& o) | |
| 75 : candidates_(std::move(o.candidates_)) {} | |
|
Taylor Brandstetter
2016/02/12 02:20:10
This is needed because JsepSessionDescription::Ini
pthatcher1
2016/02/12 03:54:34
Can you make that a comment?
Taylor Brandstetter
2016/02/12 20:44:56
Done.
| |
| 73 ~JsepCandidateCollection(); | 76 ~JsepCandidateCollection(); |
| 74 virtual size_t count() const { | 77 virtual size_t count() const { |
| 75 return candidates_.size(); | 78 return candidates_.size(); |
| 76 } | 79 } |
| 77 virtual bool HasCandidate(const IceCandidateInterface* candidate) const; | 80 virtual bool HasCandidate(const IceCandidateInterface* candidate) const; |
| 78 // Adds and takes ownership of the JsepIceCandidate. | 81 // Adds and takes ownership of the JsepIceCandidate. |
| 79 virtual void add(JsepIceCandidate* candidate) { | 82 virtual void add(JsepIceCandidate* candidate) { |
| 80 candidates_.push_back(candidate); | 83 candidates_.push_back(candidate); |
| 81 } | 84 } |
| 82 virtual const IceCandidateInterface* at(size_t index) const { | 85 virtual const IceCandidateInterface* at(size_t index) const { |
| 83 return candidates_[index]; | 86 return candidates_[index]; |
| 84 } | 87 } |
| 85 | 88 |
| 86 private: | 89 private: |
| 87 std::vector<JsepIceCandidate*> candidates_; | 90 std::vector<JsepIceCandidate*> candidates_; |
| 91 | |
| 92 RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection); | |
| 88 }; | 93 }; |
| 89 | 94 |
| 90 } // namespace webrtc | 95 } // namespace webrtc |
| 91 | 96 |
| 92 #endif // TALK_APP_WEBRTC_JSEPICECANDIDATE_H_ | 97 #endif // TALK_APP_WEBRTC_JSEPICECANDIDATE_H_ |
| OLD | NEW |