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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 1442063002: Revert of Fix leak of RTCPeerConnectionHandler if PeerConnection.close() is called from js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const FirstSessionDescription& remote); 218 const FirstSessionDescription& remote);
219 219
220 // Virtual to allow mocks to override. 220 // Virtual to allow mocks to override.
221 virtual scoped_refptr<base::SingleThreadTaskRunner> signaling_thread() const; 221 virtual scoped_refptr<base::SingleThreadTaskRunner> signaling_thread() const;
222 222
223 void RunSynchronousClosureOnSignalingThread(const base::Closure& closure, 223 void RunSynchronousClosureOnSignalingThread(const base::Closure& closure,
224 const char* trace_event_name); 224 const char* trace_event_name);
225 225
226 base::ThreadChecker thread_checker_; 226 base::ThreadChecker thread_checker_;
227 227
228 // |client_| is a weak pointer to the blink object (blink::RTCPeerConnection) 228 // |client_| is a weak pointer, and is valid until stop() has returned.
229 // that owns this object. 229 blink::WebRTCPeerConnectionHandlerClient* client_;
230 // It is valid for the lifetime of this object.
231 blink::WebRTCPeerConnectionHandlerClient* const client_;
232 // True if this PeerConnection has been closed.
233 // After the PeerConnection has been closed, this object may no longer
234 // forward callbacks to blink.
235 bool is_closed_;
236 230
237 // |dependency_factory_| is a raw pointer, and is valid for the lifetime of 231 // |dependency_factory_| is a raw pointer, and is valid for the lifetime of
238 // RenderThreadImpl. 232 // RenderThreadImpl.
239 PeerConnectionDependencyFactory* const dependency_factory_; 233 PeerConnectionDependencyFactory* const dependency_factory_;
240 234
241 blink::WebFrame* frame_ = nullptr; 235 blink::WebFrame* frame_ = nullptr;
242 236
243 ScopedVector<WebRtcMediaStreamAdapter> local_streams_; 237 ScopedVector<WebRtcMediaStreamAdapter> local_streams_;
244 238
245 base::WeakPtr<PeerConnectionTracker> peer_connection_tracker_; 239 base::WeakPtr<PeerConnectionTracker> peer_connection_tracker_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; 271 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {};
278 272
279 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; 273 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_;
280 274
281 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); 275 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);
282 }; 276 };
283 277
284 } // namespace content 278 } // namespace content
285 279
286 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 280 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698