| 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()); | |
| 135 server.password = UTF16ToUTF8(webkit_server.credential()); | 134 server.password = UTF16ToUTF8(webkit_server.credential()); |
| 136 server.uri = webkit_server.uri().spec(); | 135 server.uri = webkit_server.uri().spec(); |
| 137 servers->push_back(server); | 136 servers->push_back(server); |
| 138 } | 137 } |
| 139 } | 138 } |
| 140 | 139 |
| 141 class SessionDescriptionRequestTracker { | 140 class SessionDescriptionRequestTracker { |
| 142 public: | 141 public: |
| 143 SessionDescriptionRequestTracker(RTCPeerConnectionHandler* handler, | 142 SessionDescriptionRequestTracker(RTCPeerConnectionHandler* handler, |
| 144 PeerConnectionTracker::Action action) | 143 PeerConnectionTracker::Action action) |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 webrtc::SessionDescriptionInterface* native_desc = | 748 webrtc::SessionDescriptionInterface* native_desc = |
| 750 dependency_factory_->CreateSessionDescription(type, sdp, error); | 749 dependency_factory_->CreateSessionDescription(type, sdp, error); |
| 751 | 750 |
| 752 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 751 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 753 << " Type: " << type << " SDP: " << sdp; | 752 << " Type: " << type << " SDP: " << sdp; |
| 754 | 753 |
| 755 return native_desc; | 754 return native_desc; |
| 756 } | 755 } |
| 757 | 756 |
| 758 } // namespace content | 757 } // namespace content |
| OLD | NEW |