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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class RTCConfiguration; | 48 class RTCConfiguration; |
49 class RTCDTMFSender; | 49 class RTCDTMFSender; |
50 class RTCDataChannel; | 50 class RTCDataChannel; |
51 class RTCErrorCallback; | 51 class RTCErrorCallback; |
52 class RTCOfferOptions; | 52 class RTCOfferOptions; |
53 class RTCSessionDescription; | 53 class RTCSessionDescription; |
54 class RTCSessionDescriptionCallback; | 54 class RTCSessionDescriptionCallback; |
55 class RTCStatsCallback; | 55 class RTCStatsCallback; |
56 class VoidCallback; | 56 class VoidCallback; |
57 | 57 |
58 class RTCPeerConnection FINAL | 58 class RTCPeerConnection final |
59 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<RTCPeerCo
nnection> | 59 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<RTCPeerCo
nnection> |
60 , public WebRTCPeerConnectionHandlerClient | 60 , public WebRTCPeerConnectionHandlerClient |
61 , public EventTargetWithInlineData | 61 , public EventTargetWithInlineData |
62 , public ActiveDOMObject { | 62 , public ActiveDOMObject { |
63 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi
llBeGarbageCollectedFinalized<RTCPeerConnection>); | 63 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi
llBeGarbageCollectedFinalized<RTCPeerConnection>); |
64 DEFINE_WRAPPERTYPEINFO(); | 64 DEFINE_WRAPPERTYPEINFO(); |
65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
66 public: | 66 public: |
67 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); | 67 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); |
68 virtual ~RTCPeerConnection(); | 68 virtual ~RTCPeerConnection(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded); | 115 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded); |
116 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate); | 116 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate); |
117 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange); | 117 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange); |
118 DEFINE_ATTRIBUTE_EVENT_LISTENER(addstream); | 118 DEFINE_ATTRIBUTE_EVENT_LISTENER(addstream); |
119 DEFINE_ATTRIBUTE_EVENT_LISTENER(removestream); | 119 DEFINE_ATTRIBUTE_EVENT_LISTENER(removestream); |
120 DEFINE_ATTRIBUTE_EVENT_LISTENER(iceconnectionstatechange); | 120 DEFINE_ATTRIBUTE_EVENT_LISTENER(iceconnectionstatechange); |
121 DEFINE_ATTRIBUTE_EVENT_LISTENER(datachannel); | 121 DEFINE_ATTRIBUTE_EVENT_LISTENER(datachannel); |
122 | 122 |
123 // WebRTCPeerConnectionHandlerClient | 123 // WebRTCPeerConnectionHandlerClient |
124 virtual void negotiationNeeded() OVERRIDE; | 124 virtual void negotiationNeeded() override; |
125 virtual void didGenerateICECandidate(const WebRTCICECandidate&) OVERRIDE; | 125 virtual void didGenerateICECandidate(const WebRTCICECandidate&) override; |
126 virtual void didChangeSignalingState(SignalingState) OVERRIDE; | 126 virtual void didChangeSignalingState(SignalingState) override; |
127 virtual void didChangeICEGatheringState(ICEGatheringState) OVERRIDE; | 127 virtual void didChangeICEGatheringState(ICEGatheringState) override; |
128 virtual void didChangeICEConnectionState(ICEConnectionState) OVERRIDE; | 128 virtual void didChangeICEConnectionState(ICEConnectionState) override; |
129 virtual void didAddRemoteStream(const WebMediaStream&) OVERRIDE; | 129 virtual void didAddRemoteStream(const WebMediaStream&) override; |
130 virtual void didRemoveRemoteStream(const WebMediaStream&) OVERRIDE; | 130 virtual void didRemoveRemoteStream(const WebMediaStream&) override; |
131 virtual void didAddRemoteDataChannel(WebRTCDataChannelHandler*) OVERRIDE; | 131 virtual void didAddRemoteDataChannel(WebRTCDataChannelHandler*) override; |
132 virtual void releasePeerConnectionHandler() OVERRIDE; | 132 virtual void releasePeerConnectionHandler() override; |
133 virtual void closePeerConnection() OVERRIDE; | 133 virtual void closePeerConnection() override; |
134 | 134 |
135 // EventTarget | 135 // EventTarget |
136 virtual const AtomicString& interfaceName() const OVERRIDE; | 136 virtual const AtomicString& interfaceName() const override; |
137 virtual ExecutionContext* executionContext() const OVERRIDE; | 137 virtual ExecutionContext* executionContext() const override; |
138 | 138 |
139 // ActiveDOMObject | 139 // ActiveDOMObject |
140 virtual void suspend() OVERRIDE; | 140 virtual void suspend() override; |
141 virtual void resume() OVERRIDE; | 141 virtual void resume() override; |
142 virtual void stop() OVERRIDE; | 142 virtual void stop() override; |
143 // We keep the this object alive until either stopped or closed. | 143 // We keep the this object alive until either stopped or closed. |
144 virtual bool hasPendingActivity() const OVERRIDE | 144 virtual bool hasPendingActivity() const override |
145 { | 145 { |
146 return !m_closed && !m_stopped; | 146 return !m_closed && !m_stopped; |
147 } | 147 } |
148 | 148 |
149 virtual void trace(Visitor*) OVERRIDE; | 149 virtual void trace(Visitor*) override; |
150 | 150 |
151 private: | 151 private: |
152 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); | 152 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); |
153 | 153 |
154 | 154 |
155 static RTCConfiguration* parseConfiguration(const Dictionary&, ExceptionStat
e&); | 155 static RTCConfiguration* parseConfiguration(const Dictionary&, ExceptionStat
e&); |
156 static RTCOfferOptions* parseOfferOptions(const Dictionary&, ExceptionState&
); | 156 static RTCOfferOptions* parseOfferOptions(const Dictionary&, ExceptionState&
); |
157 | 157 |
158 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 158 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
159 void dispatchScheduledEvent(); | 159 void dispatchScheduledEvent(); |
(...skipping 19 matching lines...) Expand all Loading... |
179 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; | 179 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; |
180 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; | 180 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
181 | 181 |
182 bool m_stopped; | 182 bool m_stopped; |
183 bool m_closed; | 183 bool m_closed; |
184 }; | 184 }; |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
187 | 187 |
188 #endif // RTCPeerConnection_h | 188 #endif // RTCPeerConnection_h |
OLD | NEW |