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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class RTCConfiguration; | 50 class RTCConfiguration; |
51 class RTCDTMFSender; | 51 class RTCDTMFSender; |
52 class RTCDataChannel; | 52 class RTCDataChannel; |
53 class RTCErrorCallback; | 53 class RTCErrorCallback; |
54 class RTCSessionDescription; | 54 class RTCSessionDescription; |
55 class RTCSessionDescriptionCallback; | 55 class RTCSessionDescriptionCallback; |
56 class RTCStatsCallback; | 56 class RTCStatsCallback; |
57 class VoidCallback; | 57 class VoidCallback; |
58 | 58 |
59 class RTCPeerConnection FINAL : public RefCountedWillBeRefCountedGarbageCollecte
d<RTCPeerConnection>, public ScriptWrappable, public blink::WebRTCPeerConnection
HandlerClient, public EventTargetWithInlineData, public ActiveDOMObject { | 59 class RTCPeerConnection FINAL : public RefCountedWillBeRefCountedGarbageCollecte
d<RTCPeerConnection>, public ScriptWrappable, public blink::WebRTCPeerConnection
HandlerClient, public EventTargetWithInlineData, public ActiveDOMObject { |
60 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<R
TCPeerConnection>); | 60 REFCOUNTED_EVENT_TARGET(RTCPeerConnection); |
| 61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
61 public: | 62 public: |
62 static PassRefPtrWillBeRawPtr<RTCPeerConnection> create(ExecutionContext*, c
onst Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, Exception
State&); | 63 static PassRefPtrWillBeRawPtr<RTCPeerConnection> create(ExecutionContext*, c
onst Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, Exception
State&); |
63 virtual ~RTCPeerConnection(); | 64 virtual ~RTCPeerConnection(); |
64 | 65 |
65 void createOffer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCEr
rorCallback>, const Dictionary& mediaConstraints, ExceptionState&); | 66 void createOffer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCEr
rorCallback>, const Dictionary& mediaConstraints, ExceptionState&); |
66 | 67 |
67 void createAnswer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCE
rrorCallback>, const Dictionary& mediaConstraints, ExceptionState&); | 68 void createAnswer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCE
rrorCallback>, const Dictionary& mediaConstraints, ExceptionState&); |
68 | 69 |
69 void setLocalDescription(PassRefPtrWillBeRawPtr<RTCSessionDescription>, Pass
OwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&); | 70 void setLocalDescription(PassRefPtrWillBeRawPtr<RTCSessionDescription>, Pass
OwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&); |
70 PassRefPtrWillBeRawPtr<RTCSessionDescription> localDescription(ExceptionStat
e&); | 71 PassRefPtrWillBeRawPtr<RTCSessionDescription> localDescription(ExceptionStat
e&); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // EventTarget | 126 // EventTarget |
126 virtual const AtomicString& interfaceName() const OVERRIDE; | 127 virtual const AtomicString& interfaceName() const OVERRIDE; |
127 virtual ExecutionContext* executionContext() const OVERRIDE; | 128 virtual ExecutionContext* executionContext() const OVERRIDE; |
128 | 129 |
129 // ActiveDOMObject | 130 // ActiveDOMObject |
130 virtual void suspend() OVERRIDE; | 131 virtual void suspend() OVERRIDE; |
131 virtual void resume() OVERRIDE; | 132 virtual void resume() OVERRIDE; |
132 virtual void stop() OVERRIDE; | 133 virtual void stop() OVERRIDE; |
133 virtual bool hasPendingActivity() const OVERRIDE { return !m_stopped; } | 134 virtual bool hasPendingActivity() const OVERRIDE { return !m_stopped; } |
134 | 135 |
135 void trace(Visitor*); | 136 virtual void trace(Visitor*) OVERRIDE; |
136 | 137 |
137 private: | 138 private: |
138 RTCPeerConnection(ExecutionContext*, PassRefPtr<RTCConfiguration>, blink::We
bMediaConstraints, ExceptionState&); | 139 RTCPeerConnection(ExecutionContext*, PassRefPtr<RTCConfiguration>, blink::We
bMediaConstraints, ExceptionState&); |
139 | 140 |
140 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con
figuration, ExceptionState&); | 141 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con
figuration, ExceptionState&); |
141 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 142 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
142 void dispatchScheduledEvent(); | 143 void dispatchScheduledEvent(); |
143 bool hasLocalStreamWithTrackId(const String& trackId); | 144 bool hasLocalStreamWithTrackId(const String& trackId); |
144 | 145 |
145 void changeSignalingState(blink::WebRTCPeerConnectionHandlerClient::Signalin
gState); | 146 void changeSignalingState(blink::WebRTCPeerConnectionHandlerClient::Signalin
gState); |
(...skipping 13 matching lines...) Expand all Loading... |
159 | 160 |
160 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; | 161 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; |
161 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; | 162 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
162 | 163 |
163 bool m_stopped; | 164 bool m_stopped; |
164 }; | 165 }; |
165 | 166 |
166 } // namespace WebCore | 167 } // namespace WebCore |
167 | 168 |
168 #endif // RTCPeerConnection_h | 169 #endif // RTCPeerConnection_h |
OLD | NEW |