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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dependency_factory.cc ('k') | content/renderer/pepper/pepper_file_io_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698