Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: Source/modules/mediastream/RTCPeerConnection.h

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class MediaStreamTrack; 49 class MediaStreamTrack;
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 RefCounted<RTCPeerConnection>, public Scr iptWrappable, public blink::WebRTCPeerConnectionHandlerClient, public EventTarge tWithInlineData, public ActiveDOMObject { 59 class RTCPeerConnection FINAL : public RefCountedWillBeRefCountedGarbageCollecte d<RTCPeerConnection>, public ScriptWrappable, public blink::WebRTCPeerConnection HandlerClient, public EventTargetWithInlineData, public ActiveDOMObject {
60 REFCOUNTED_EVENT_TARGET(RTCPeerConnection); 60 REFCOUNTED_EVENT_TARGET(RTCPeerConnection);
61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection);
61 public: 62 public:
62 static PassRefPtr<RTCPeerConnection> create(ExecutionContext*, const Diction ary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&); 63 static PassRefPtr<RTCPeerConnection> create(ExecutionContext*, const Diction ary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&);
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(PassRefPtr<RTCSessionDescription>, PassOwnPtr<VoidC allback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&); 70 void setLocalDescription(PassRefPtr<RTCSessionDescription>, PassOwnPtr<VoidC allback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
70 PassRefPtr<RTCSessionDescription> localDescription(ExceptionState&); 71 PassRefPtr<RTCSessionDescription> localDescription(ExceptionState&);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
136 virtual void trace(Visitor*) OVERRIDE;
137
135 private: 138 private:
136 RTCPeerConnection(ExecutionContext*, PassRefPtr<RTCConfiguration>, blink::We bMediaConstraints, ExceptionState&); 139 RTCPeerConnection(ExecutionContext*, PassRefPtr<RTCConfiguration>, blink::We bMediaConstraints, ExceptionState&);
137 140
138 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con figuration, ExceptionState&); 141 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& con figuration, ExceptionState&);
139 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); 142 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
140 void dispatchScheduledEvent(); 143 void dispatchScheduledEvent();
141 bool hasLocalStreamWithTrackId(const String& trackId); 144 bool hasLocalStreamWithTrackId(const String& trackId);
142 145
143 void changeSignalingState(blink::WebRTCPeerConnectionHandlerClient::Signalin gState); 146 void changeSignalingState(blink::WebRTCPeerConnectionHandlerClient::Signalin gState);
144 void changeIceGatheringState(blink::WebRTCPeerConnectionHandlerClient::ICEGa theringState); 147 void changeIceGatheringState(blink::WebRTCPeerConnectionHandlerClient::ICEGa theringState);
145 void changeIceConnectionState(blink::WebRTCPeerConnectionHandlerClient::ICEC onnectionState); 148 void changeIceConnectionState(blink::WebRTCPeerConnectionHandlerClient::ICEC onnectionState);
146 149
147 SignalingState m_signalingState; 150 SignalingState m_signalingState;
148 ICEGatheringState m_iceGatheringState; 151 ICEGatheringState m_iceGatheringState;
149 ICEConnectionState m_iceConnectionState; 152 ICEConnectionState m_iceConnectionState;
150 153
151 MediaStreamVector m_localStreams; 154 MediaStreamVector m_localStreams;
152 MediaStreamVector m_remoteStreams; 155 MediaStreamVector m_remoteStreams;
153 156
154 Vector<RefPtr<RTCDataChannel> > m_dataChannels; 157 Vector<RefPtr<RTCDataChannel> > m_dataChannels;
155 158
156 OwnPtr<blink::WebRTCPeerConnectionHandler> m_peerHandler; 159 OwnPtr<blink::WebRTCPeerConnectionHandler> m_peerHandler;
157 160
158 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; 161 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner;
159 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; 162 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents;
160 163
161 bool m_stopped; 164 bool m_stopped;
162 }; 165 };
163 166
164 } // namespace WebCore 167 } // namespace WebCore
165 168
166 #endif // RTCPeerConnection_h 169 #endif // RTCPeerConnection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698