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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #include "ActiveDOMObject.h" | 36 #include "ActiveDOMObject.h" |
37 #include "Dictionary.h" | 37 #include "Dictionary.h" |
38 #include "EventTarget.h" | 38 #include "EventTarget.h" |
39 #include "ExceptionBase.h" | 39 #include "ExceptionBase.h" |
40 #include "MediaStream.h" | 40 #include "MediaStream.h" |
41 #include "MediaStreamList.h" | 41 #include "MediaStreamList.h" |
42 #include "RTCIceCandidate.h" | 42 #include "RTCIceCandidate.h" |
43 #include "RTCPeerConnectionHandler.h" | 43 #include "RTCPeerConnectionHandler.h" |
44 #include "RTCPeerConnectionHandlerClient.h" | 44 #include "RTCPeerConnectionHandlerClient.h" |
| 45 #include "Timer.h" |
45 #include <wtf/RefCounted.h> | 46 #include <wtf/RefCounted.h> |
46 | 47 |
47 namespace WebCore { | 48 namespace WebCore { |
48 | 49 |
49 class MediaConstraints; | 50 class MediaConstraints; |
50 class RTCConfiguration; | 51 class RTCConfiguration; |
51 class RTCErrorCallback; | 52 class RTCErrorCallback; |
52 class RTCSessionDescription; | 53 class RTCSessionDescription; |
53 class RTCSessionDescriptionCallback; | 54 class RTCSessionDescriptionCallback; |
54 class VoidCallback; | 55 class VoidCallback; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // ActiveDOMObject | 110 // ActiveDOMObject |
110 virtual void stop() OVERRIDE; | 111 virtual void stop() OVERRIDE; |
111 | 112 |
112 using RefCounted<RTCPeerConnection>::ref; | 113 using RefCounted<RTCPeerConnection>::ref; |
113 using RefCounted<RTCPeerConnection>::deref; | 114 using RefCounted<RTCPeerConnection>::deref; |
114 | 115 |
115 private: | 116 private: |
116 RTCPeerConnection(ScriptExecutionContext*, PassRefPtr<RTCConfiguration>, Pas
sRefPtr<MediaConstraints>, ExceptionCode&); | 117 RTCPeerConnection(ScriptExecutionContext*, PassRefPtr<RTCConfiguration>, Pas
sRefPtr<MediaConstraints>, ExceptionCode&); |
117 | 118 |
118 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con
figuration, ExceptionCode&); | 119 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con
figuration, ExceptionCode&); |
| 120 void scheduleDispatchEvent(PassRefPtr<Event>); |
| 121 void scheduledEventTimerFired(Timer<RTCPeerConnection>*); |
119 | 122 |
120 // EventTarget implementation. | 123 // EventTarget implementation. |
121 virtual EventTargetData* eventTargetData(); | 124 virtual EventTargetData* eventTargetData(); |
122 virtual EventTargetData* ensureEventTargetData(); | 125 virtual EventTargetData* ensureEventTargetData(); |
123 virtual void refEventTarget() { ref(); } | 126 virtual void refEventTarget() { ref(); } |
124 virtual void derefEventTarget() { deref(); } | 127 virtual void derefEventTarget() { deref(); } |
125 EventTargetData m_eventTargetData; | 128 EventTargetData m_eventTargetData; |
126 | 129 |
127 void changeReadyState(ReadyState); | 130 void changeReadyState(ReadyState); |
128 void changeIceState(IceState); | 131 void changeIceState(IceState); |
129 | 132 |
130 ReadyState m_readyState; | 133 ReadyState m_readyState; |
131 IceState m_iceState; | 134 IceState m_iceState; |
132 | 135 |
133 RefPtr<MediaStreamList> m_localStreams; | 136 RefPtr<MediaStreamList> m_localStreams; |
134 RefPtr<MediaStreamList> m_remoteStreams; | 137 RefPtr<MediaStreamList> m_remoteStreams; |
135 | 138 |
136 OwnPtr<RTCPeerConnectionHandler> m_peerHandler; | 139 OwnPtr<RTCPeerConnectionHandler> m_peerHandler; |
| 140 |
| 141 Timer<RTCPeerConnection> m_scheduledEventTimer; |
| 142 Vector<RefPtr<Event> > m_scheduledEvents; |
137 }; | 143 }; |
138 | 144 |
139 } // namespace WebCore | 145 } // namespace WebCore |
140 | 146 |
141 #endif // ENABLE(MEDIA_STREAM) | 147 #endif // ENABLE(MEDIA_STREAM) |
142 | 148 |
143 #endif // RTCPeerConnection_h | 149 #endif // RTCPeerConnection_h |
OLD | NEW |