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..0edbdb75fb472e410c3ef4ce8a56e157773ba90f 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,36 @@ 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; |
|
haraken
2015/12/17 03:03:20
This is wrong even on non-oilpan... This must be a
|
| + }; |
| + |
| 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); |
| + // Changes the state immediately; does not fire an event. |
| + // Returns true if the state was changed. |
| + bool setIceConnectionState(WebRTCPeerConnectionHandlerClient::ICEConnectionState); |
| + // Changes the state asynchronously and fires an event immediately after changing the state. |
| void changeIceConnectionState(WebRTCPeerConnectionHandlerClient::ICEConnectionState); |
| void closeInternal(); |
| @@ -183,7 +201,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; |