| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef RTCPeerConnectionHandlerChromium_h | 31 #ifndef RTCPeerConnectionHandlerChromium_h |
| 32 #define RTCPeerConnectionHandlerChromium_h | 32 #define RTCPeerConnectionHandlerChromium_h |
| 33 | 33 |
| 34 #include "core/platform/mediastream/MediaStreamDescriptor.h" |
| 34 #include "core/platform/mediastream/RTCPeerConnectionHandler.h" | 35 #include "core/platform/mediastream/RTCPeerConnectionHandler.h" |
| 35 #include "public/platform/WebMediaStream.h" | |
| 36 #include "public/platform/WebRTCPeerConnectionHandler.h" | 36 #include "public/platform/WebRTCPeerConnectionHandler.h" |
| 37 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" | 37 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" |
| 38 #include <wtf/OwnPtr.h> | 38 #include <wtf/OwnPtr.h> |
| 39 #include <wtf/PassRefPtr.h> | 39 #include <wtf/PassRefPtr.h> |
| 40 | 40 |
| 41 namespace WebKit { | 41 namespace WebKit { |
| 42 class WebMediaStream; |
| 42 class WebRTCICECandidate; | 43 class WebRTCICECandidate; |
| 43 class WebRTCSessionDescription; | 44 class WebRTCSessionDescription; |
| 44 } | 45 } |
| 45 | 46 |
| 46 namespace WebCore { | 47 namespace WebCore { |
| 47 | 48 |
| 48 class RTCDataChannelHandler; | 49 class RTCDataChannelHandler; |
| 49 | 50 |
| 50 class RTCPeerConnectionHandlerChromium : public RTCPeerConnectionHandler, public
WebKit::WebRTCPeerConnectionHandlerClient { | 51 class RTCPeerConnectionHandlerChromium : public RTCPeerConnectionHandler, public
WebKit::WebRTCPeerConnectionHandlerClient { |
| 51 public: | 52 public: |
| 52 explicit RTCPeerConnectionHandlerChromium(RTCPeerConnectionHandlerClient*); | 53 explicit RTCPeerConnectionHandlerChromium(RTCPeerConnectionHandlerClient*); |
| 53 virtual ~RTCPeerConnectionHandlerChromium(); | 54 virtual ~RTCPeerConnectionHandlerChromium(); |
| 54 | 55 |
| 55 bool createWebHandler(); | 56 bool createWebHandler(); |
| 56 | 57 |
| 57 virtual bool initialize(PassRefPtr<RTCConfiguration>, PassRefPtr<MediaConstr
aints>) OVERRIDE; | 58 virtual bool initialize(PassRefPtr<RTCConfiguration>, PassRefPtr<MediaConstr
aints>) OVERRIDE; |
| 58 | 59 |
| 59 virtual void createOffer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefPt
r<MediaConstraints>) OVERRIDE; | 60 virtual void createOffer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefPt
r<MediaConstraints>) OVERRIDE; |
| 60 virtual void createAnswer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefP
tr<MediaConstraints>) OVERRIDE; | 61 virtual void createAnswer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefP
tr<MediaConstraints>) OVERRIDE; |
| 61 virtual void setLocalDescription(PassRefPtr<RTCVoidRequest>, WebKit::WebRTCS
essionDescription) OVERRIDE; | 62 virtual void setLocalDescription(PassRefPtr<RTCVoidRequest>, WebKit::WebRTCS
essionDescription) OVERRIDE; |
| 62 virtual void setRemoteDescription(PassRefPtr<RTCVoidRequest>, WebKit::WebRTC
SessionDescription) OVERRIDE; | 63 virtual void setRemoteDescription(PassRefPtr<RTCVoidRequest>, WebKit::WebRTC
SessionDescription) OVERRIDE; |
| 63 virtual WebKit::WebRTCSessionDescription localDescription() OVERRIDE; | 64 virtual WebKit::WebRTCSessionDescription localDescription() OVERRIDE; |
| 64 virtual WebKit::WebRTCSessionDescription remoteDescription() OVERRIDE; | 65 virtual WebKit::WebRTCSessionDescription remoteDescription() OVERRIDE; |
| 65 virtual bool updateIce(PassRefPtr<RTCConfiguration>, PassRefPtr<MediaConstra
ints>) OVERRIDE; | 66 virtual bool updateIce(PassRefPtr<RTCConfiguration>, PassRefPtr<MediaConstra
ints>) OVERRIDE; |
| 66 virtual bool addIceCandidate(WebKit::WebRTCICECandidate) OVERRIDE; | 67 virtual bool addIceCandidate(WebKit::WebRTCICECandidate) OVERRIDE; |
| 67 virtual bool addStream(WebKit::WebMediaStream, PassRefPtr<MediaConstraints>)
OVERRIDE; | 68 virtual bool addStream(PassRefPtr<MediaStreamDescriptor>, PassRefPtr<MediaCo
nstraints>) OVERRIDE; |
| 68 virtual void removeStream(WebKit::WebMediaStream) OVERRIDE; | 69 virtual void removeStream(PassRefPtr<MediaStreamDescriptor>) OVERRIDE; |
| 69 virtual void getStats(PassRefPtr<RTCStatsRequest>) OVERRIDE; | 70 virtual void getStats(PassRefPtr<RTCStatsRequest>) OVERRIDE; |
| 70 virtual PassOwnPtr<RTCDataChannelHandler> createDataChannel(const String& la
bel, const WebKit::WebRTCDataChannelInit&) OVERRIDE; | 71 virtual PassOwnPtr<RTCDataChannelHandler> createDataChannel(const String& la
bel, const WebKit::WebRTCDataChannelInit&) OVERRIDE; |
| 71 virtual PassOwnPtr<RTCDTMFSenderHandler> createDTMFSender(PassRefPtr<MediaSt
reamComponent>) OVERRIDE; | 72 virtual PassOwnPtr<RTCDTMFSenderHandler> createDTMFSender(PassRefPtr<MediaSt
reamComponent>) OVERRIDE; |
| 72 virtual void stop() OVERRIDE; | 73 virtual void stop() OVERRIDE; |
| 73 | 74 |
| 74 // WebKit::WebRTCPeerConnectionHandlerClient implementation. | 75 // WebKit::WebRTCPeerConnectionHandlerClient implementation. |
| 75 virtual void negotiationNeeded() OVERRIDE; | 76 virtual void negotiationNeeded() OVERRIDE; |
| 76 virtual void didGenerateICECandidate(const WebKit::WebRTCICECandidate&) OVER
RIDE; | 77 virtual void didGenerateICECandidate(const WebKit::WebRTCICECandidate&) OVER
RIDE; |
| 77 virtual void didChangeSignalingState(WebKit::WebRTCPeerConnectionHandlerClie
nt::SignalingState) OVERRIDE; | 78 virtual void didChangeSignalingState(WebKit::WebRTCPeerConnectionHandlerClie
nt::SignalingState) OVERRIDE; |
| 78 virtual void didChangeICEGatheringState(WebKit::WebRTCPeerConnectionHandlerC
lient::ICEGatheringState) OVERRIDE; | 79 virtual void didChangeICEGatheringState(WebKit::WebRTCPeerConnectionHandlerC
lient::ICEGatheringState) OVERRIDE; |
| 79 virtual void didChangeICEConnectionState(WebKit::WebRTCPeerConnectionHandler
Client::ICEConnectionState) OVERRIDE; | 80 virtual void didChangeICEConnectionState(WebKit::WebRTCPeerConnectionHandler
Client::ICEConnectionState) OVERRIDE; |
| 80 virtual void didAddRemoteStream(const WebKit::WebMediaStream&) OVERRIDE; | 81 virtual void didAddRemoteStream(const WebKit::WebMediaStream&) OVERRIDE; |
| 81 virtual void didRemoveRemoteStream(const WebKit::WebMediaStream&) OVERRIDE; | 82 virtual void didRemoveRemoteStream(const WebKit::WebMediaStream&) OVERRIDE; |
| 82 virtual void didAddRemoteDataChannel(WebKit::WebRTCDataChannelHandler*) OVER
RIDE; | 83 virtual void didAddRemoteDataChannel(WebKit::WebRTCDataChannelHandler*) OVER
RIDE; |
| 83 | 84 |
| 84 static WebKit::WebRTCPeerConnectionHandler* toWebRTCPeerConnectionHandler(RT
CPeerConnectionHandler*); | 85 static WebKit::WebRTCPeerConnectionHandler* toWebRTCPeerConnectionHandler(RT
CPeerConnectionHandler*); |
| 85 | 86 |
| 86 private: | 87 private: |
| 87 OwnPtr<WebKit::WebRTCPeerConnectionHandler> m_webHandler; | 88 OwnPtr<WebKit::WebRTCPeerConnectionHandler> m_webHandler; |
| 88 RTCPeerConnectionHandlerClient* m_client; | 89 RTCPeerConnectionHandlerClient* m_client; |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace WebCore | 92 } // namespace WebCore |
| 92 | 93 |
| 93 #endif // RTCPeerConnectionHandlerChromium_h | 94 #endif // RTCPeerConnectionHandlerChromium_h |
| OLD | NEW |