| 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 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 NOTREACHED(); | 55 NOTREACHED(); |
| 56 return WebKit::WebRTCPeerConnectionHandlerClient::ICEStateClosed; | 56 return WebKit::WebRTCPeerConnectionHandlerClient::ICEStateClosed; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 static WebKit::WebRTCPeerConnectionHandlerClient::ReadyState | 60 static WebKit::WebRTCPeerConnectionHandlerClient::ReadyState |
| 61 GetWebKitReadyState(webrtc::PeerConnectionInterface::ReadyState ready_state) { | 61 GetWebKitReadyState(webrtc::PeerConnectionInterface::ReadyState ready_state) { |
| 62 switch (ready_state) { | 62 switch (ready_state) { |
| 63 case webrtc::PeerConnectionInterface::kNew: | 63 case webrtc::PeerConnectionInterface::kNew: |
| 64 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateNew; | 64 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateNew; |
| 65 case webrtc::PeerConnectionInterface::kOpening: | 65 |
| 66 case webrtc::PeerConnectionInterface::kHaveLocalOffer: |
| 67 case webrtc::PeerConnectionInterface::kHaveLocalPrAnswer: |
| 68 case webrtc::PeerConnectionInterface::kHaveRemoteOffer: |
| 69 case webrtc::PeerConnectionInterface::kHaveRemotePrAnswer: |
| 66 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateOpening; | 70 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateOpening; |
| 67 case webrtc::PeerConnectionInterface::kActive: | 71 case webrtc::PeerConnectionInterface::kActive: |
| 68 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateActive; | 72 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateActive; |
| 69 case webrtc::PeerConnectionInterface::kClosing: | |
| 70 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateClosing; | |
| 71 case webrtc::PeerConnectionInterface::kClosed: | 73 case webrtc::PeerConnectionInterface::kClosed: |
| 72 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateClosed; | 74 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateClosed; |
| 73 default: | 75 default: |
| 74 NOTREACHED(); | 76 NOTREACHED(); |
| 75 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateClosed; | 77 return WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateClosed; |
| 76 } | 78 } |
| 77 } | 79 } |
| 78 | 80 |
| 79 static WebKit::WebRTCSessionDescription | 81 static WebKit::WebRTCSessionDescription |
| 80 CreateWebKitSessionDescription( | 82 CreateWebKitSessionDescription( |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 webrtc::SessionDescriptionInterface* native_desc = | 590 webrtc::SessionDescriptionInterface* native_desc = |
| 589 dependency_factory_->CreateSessionDescription(type, sdp); | 591 dependency_factory_->CreateSessionDescription(type, sdp); |
| 590 | 592 |
| 591 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 593 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 592 << " Type: " << type << " SDP: " << sdp; | 594 << " Type: " << type << " SDP: " << sdp; |
| 593 | 595 |
| 594 return native_desc; | 596 return native_desc; |
| 595 } | 597 } |
| 596 | 598 |
| 597 } // namespace content | 599 } // namespace content |
| OLD | NEW |