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

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

Issue 16232004: Adds DataChannelInit param to createDataChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 if (!native_peer_connection_->GetStats(observer, track)) { 571 if (!native_peer_connection_->GetStats(observer, track)) {
572 DVLOG(1) << "GetStats failed."; 572 DVLOG(1) << "GetStats failed.";
573 // TODO(hta): Consider how to get an error back. 573 // TODO(hta): Consider how to get an error back.
574 std::vector<webrtc::StatsReport> no_reports; 574 std::vector<webrtc::StatsReport> no_reports;
575 observer->OnComplete(no_reports); 575 observer->OnComplete(no_reports);
576 return; 576 return;
577 } 577 }
578 } 578 }
579 579
580 WebKit::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( 580 WebKit::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel(
581 const WebKit::WebString& label, const WebKit::WebRTCDataChannelInit& init) {
582 // TODO(jiayl): update reliable to
583 // (init.ordered && init.maxRetransmitTime == -1 && init.maxRetransmits == -1)
584 // once Libjingle is updated to ignore this field for RTP data channels.
585 bool reliable = false;
586 return createDataChannel(label, reliable);
587 }
588
589 WebKit::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel(
581 const WebKit::WebString& label, bool reliable) { 590 const WebKit::WebString& label, bool reliable) {
582 DVLOG(1) << "createDataChannel label " << UTF16ToUTF8(label); 591 DVLOG(1) << "createDataChannel label " << UTF16ToUTF8(label);
583 592
584 webrtc::DataChannelInit config; 593 webrtc::DataChannelInit config;
585 config.reliable = reliable; 594 config.reliable = reliable;
586 595
587 talk_base::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel( 596 talk_base::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel(
588 native_peer_connection_->CreateDataChannel(UTF16ToUTF8(label), &config)); 597 native_peer_connection_->CreateDataChannel(UTF16ToUTF8(label), &config));
589 if (!webrtc_channel) { 598 if (!webrtc_channel) {
590 DLOG(ERROR) << "Could not create native data channel."; 599 DLOG(ERROR) << "Could not create native data channel.";
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 webrtc::SessionDescriptionInterface* native_desc = 769 webrtc::SessionDescriptionInterface* native_desc =
761 dependency_factory_->CreateSessionDescription(type, sdp, error); 770 dependency_factory_->CreateSessionDescription(type, sdp, error);
762 771
763 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." 772 LOG_IF(ERROR, !native_desc) << "Failed to create native session description."
764 << " Type: " << type << " SDP: " << sdp; 773 << " Type: " << type << " SDP: " << sdp;
765 774
766 return native_desc; 775 return native_desc;
767 } 776 }
768 777
769 } // namespace content 778 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698