Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h |
| diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h |
| index ddbd951d8745f936f3cf9ef2f0df4d6c26404ca1..f6c664c586a656453e91ef44292955de7eede101 100644 |
| --- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h |
| +++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h |
| @@ -44,7 +44,6 @@ |
| #include "public/platform/WebRTCPeerConnectionHandlerClient.h" |
| namespace blink { |
| - |
| class ExceptionState; |
| class MediaStreamTrack; |
| class RTCConfiguration; |
| @@ -156,17 +155,33 @@ public: |
| DECLARE_VIRTUAL_TRACE(); |
| private: |
| + typedef Function<bool()> BoolFunction; |
| + class EventWrapper { |
| + public: |
| + EventWrapper(PassRefPtrWillBeRawPtr<Event>, PassOwnPtrWillBeRawPtr<BoolFunction>); |
| + // Returns true if |m_setupFunction| returns true or it is null. |
| + // |m_event| will only be fired if setup() returns true; |
| + bool setup(); |
| + |
| + RefPtrWillBeMember<Event> m_event; |
| + |
| + private: |
| + PassOwnPtrWillBeRawPtr<BoolFunction> m_setupFunction; |
| + }; |
| + |
| RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints, ExceptionState&); |
| static RTCConfiguration* parseConfiguration(const Dictionary&, ExceptionState&); |
| static RTCOfferOptions* parseOfferOptions(const Dictionary&, ExceptionState&); |
| void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
| + void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>, PassOwnPtrWillBeRawPtr<BoolFunction>); |
| void dispatchScheduledEvent(); |
| bool hasLocalStreamWithTrackId(const String& trackId); |
| void changeSignalingState(WebRTCPeerConnectionHandlerClient::SignalingState); |
| void changeIceGatheringState(WebRTCPeerConnectionHandlerClient::ICEGatheringState); |
| + bool setIceConnectionState(WebRTCPeerConnectionHandlerClient::ICEConnectionState); |
|
pthatcher2
2015/12/15 23:59:20
Can you leave a comment saying something like "set
honghaiz
2015/12/16 00:21:01
Done.
|
| void changeIceConnectionState(WebRTCPeerConnectionHandlerClient::ICEConnectionState); |
| void closeInternal(); |
| @@ -183,7 +198,7 @@ private: |
| OwnPtr<WebRTCPeerConnectionHandler> m_peerHandler; |
| AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; |
| - WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; |
| + WillBeHeapVector<EventWrapper> m_scheduledEvents; |
| bool m_stopped; |
| bool m_closed; |