| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 public: | 179 public: |
| 180 explicit CreateSessionDescriptionRequest( | 180 explicit CreateSessionDescriptionRequest( |
| 181 const blink::WebRTCSessionDescriptionRequest& request, | 181 const blink::WebRTCSessionDescriptionRequest& request, |
| 182 RTCPeerConnectionHandler* handler, | 182 RTCPeerConnectionHandler* handler, |
| 183 PeerConnectionTracker::Action action) | 183 PeerConnectionTracker::Action action) |
| 184 : webkit_request_(request), tracker_(handler, action) {} | 184 : webkit_request_(request), tracker_(handler, action) {} |
| 185 | 185 |
| 186 virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) OVERRIDE { | 186 virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) OVERRIDE { |
| 187 tracker_.TrackOnSuccess(desc); | 187 tracker_.TrackOnSuccess(desc); |
| 188 webkit_request_.requestSucceeded(CreateWebKitSessionDescription(desc)); | 188 webkit_request_.requestSucceeded(CreateWebKitSessionDescription(desc)); |
| 189 delete desc; |
| 189 } | 190 } |
| 190 virtual void OnFailure(const std::string& error) OVERRIDE { | 191 virtual void OnFailure(const std::string& error) OVERRIDE { |
| 191 tracker_.TrackOnFailure(error); | 192 tracker_.TrackOnFailure(error); |
| 192 webkit_request_.requestFailed(base::UTF8ToUTF16(error)); | 193 webkit_request_.requestFailed(base::UTF8ToUTF16(error)); |
| 193 } | 194 } |
| 194 | 195 |
| 195 protected: | 196 protected: |
| 196 virtual ~CreateSessionDescriptionRequest() {} | 197 virtual ~CreateSessionDescriptionRequest() {} |
| 197 | 198 |
| 198 private: | 199 private: |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 webrtc::SessionDescriptionInterface* native_desc = | 862 webrtc::SessionDescriptionInterface* native_desc = |
| 862 dependency_factory_->CreateSessionDescription(type, sdp, error); | 863 dependency_factory_->CreateSessionDescription(type, sdp, error); |
| 863 | 864 |
| 864 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 865 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 865 << " Type: " << type << " SDP: " << sdp; | 866 << " Type: " << type << " SDP: " << sdp; |
| 866 | 867 |
| 867 return native_desc; | 868 return native_desc; |
| 868 } | 869 } |
| 869 | 870 |
| 870 } // namespace content | 871 } // namespace content |
| OLD | NEW |