| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 static void GetNativeIceServers( | 125 static void GetNativeIceServers( |
| 126 const WebKit::WebRTCConfiguration& server_configuration, | 126 const WebKit::WebRTCConfiguration& server_configuration, |
| 127 webrtc::PeerConnectionInterface::IceServers* servers) { | 127 webrtc::PeerConnectionInterface::IceServers* servers) { |
| 128 if (server_configuration.isNull() || !servers) | 128 if (server_configuration.isNull() || !servers) |
| 129 return; | 129 return; |
| 130 for (size_t i = 0; i < server_configuration.numberOfServers(); ++i) { | 130 for (size_t i = 0; i < server_configuration.numberOfServers(); ++i) { |
| 131 webrtc::PeerConnectionInterface::IceServer server; | 131 webrtc::PeerConnectionInterface::IceServer server; |
| 132 const WebKit::WebRTCICEServer& webkit_server = | 132 const WebKit::WebRTCICEServer& webkit_server = |
| 133 server_configuration.server(i); | 133 server_configuration.server(i); |
| 134 server.username = UTF16ToUTF8(webkit_server.username()); |
| 134 server.password = UTF16ToUTF8(webkit_server.credential()); | 135 server.password = UTF16ToUTF8(webkit_server.credential()); |
| 135 server.uri = webkit_server.uri().spec(); | 136 server.uri = webkit_server.uri().spec(); |
| 136 servers->push_back(server); | 137 servers->push_back(server); |
| 137 } | 138 } |
| 138 } | 139 } |
| 139 | 140 |
| 140 class SessionDescriptionRequestTracker { | 141 class SessionDescriptionRequestTracker { |
| 141 public: | 142 public: |
| 142 SessionDescriptionRequestTracker(RTCPeerConnectionHandler* handler, | 143 SessionDescriptionRequestTracker(RTCPeerConnectionHandler* handler, |
| 143 PeerConnectionTracker::Action action) | 144 PeerConnectionTracker::Action action) |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 webrtc::SessionDescriptionInterface* native_desc = | 749 webrtc::SessionDescriptionInterface* native_desc = |
| 749 dependency_factory_->CreateSessionDescription(type, sdp, error); | 750 dependency_factory_->CreateSessionDescription(type, sdp, error); |
| 750 | 751 |
| 751 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 752 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 752 << " Type: " << type << " SDP: " << sdp; | 753 << " Type: " << type << " SDP: " << sdp; |
| 753 | 754 |
| 754 return native_desc; | 755 return native_desc; |
| 755 } | 756 } |
| 756 | 757 |
| 757 } // namespace content | 758 } // namespace content |
| OLD | NEW |