OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 private: | 222 private: |
223 WebKit::WebRTCVoidRequest webkit_request_; | 223 WebKit::WebRTCVoidRequest webkit_request_; |
224 SessionDescriptionRequestTracker tracker_; | 224 SessionDescriptionRequestTracker tracker_; |
225 }; | 225 }; |
226 | 226 |
227 // Class mapping responses from calls to libjingle | 227 // Class mapping responses from calls to libjingle |
228 // GetStats into a WebKit::WebRTCStatsCallback. | 228 // GetStats into a WebKit::WebRTCStatsCallback. |
229 class StatsResponse : public webrtc::StatsObserver { | 229 class StatsResponse : public webrtc::StatsObserver { |
230 public: | 230 public: |
231 explicit StatsResponse(const scoped_refptr<LocalRTCStatsRequest>& request) | 231 explicit StatsResponse(const scoped_refptr<LocalRTCStatsRequest>& request) |
232 : request_(request.get()), response_(request_->createResponse()) {} | 232 : request_(request.get()), response_(request_->createResponse().get()) {} |
233 | 233 |
234 virtual void OnComplete( | 234 virtual void OnComplete( |
235 const std::vector<webrtc::StatsReport>& reports) OVERRIDE { | 235 const std::vector<webrtc::StatsReport>& reports) OVERRIDE { |
236 for (std::vector<webrtc::StatsReport>::const_iterator it = reports.begin(); | 236 for (std::vector<webrtc::StatsReport>::const_iterator it = reports.begin(); |
237 it != reports.end(); ++it) { | 237 it != reports.end(); ++it) { |
238 if (it->values.size() > 0) { | 238 if (it->values.size() > 0) { |
239 AddReport(*it); | 239 AddReport(*it); |
240 } | 240 } |
241 } | 241 } |
242 request_->requestSucceeded(response_); | 242 request_->requestSucceeded(response_); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 webrtc::SessionDescriptionInterface* native_desc = | 769 webrtc::SessionDescriptionInterface* native_desc = |
770 dependency_factory_->CreateSessionDescription(type, sdp, error); | 770 dependency_factory_->CreateSessionDescription(type, sdp, error); |
771 | 771 |
772 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 772 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
773 << " Type: " << type << " SDP: " << sdp; | 773 << " Type: " << type << " SDP: " << sdp; |
774 | 774 |
775 return native_desc; | 775 return native_desc; |
776 } | 776 } |
777 | 777 |
778 } // namespace content | 778 } // namespace content |
OLD | NEW |