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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h

Issue 1744133002: Reduce ActiveDOMObjects from modules/mediastream/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef RTCSessionDescriptionRequestImpl_h 31 #ifndef RTCSessionDescriptionRequestImpl_h
32 #define RTCSessionDescriptionRequestImpl_h 32 #define RTCSessionDescriptionRequestImpl_h
33 33
34 #include "core/dom/ActiveDOMObject.h" 34 #include "core/dom/ContextLifecycleObserver.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "platform/mediastream/RTCSessionDescriptionRequest.h" 36 #include "platform/mediastream/RTCSessionDescriptionRequest.h"
37 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class RTCPeerConnection; 42 class RTCPeerConnection;
43 class RTCPeerConnectionErrorCallback; 43 class RTCPeerConnectionErrorCallback;
44 class RTCSessionDescriptionCallback; 44 class RTCSessionDescriptionCallback;
45 class WebRTCSessionDescription; 45 class WebRTCSessionDescription;
46 46
47 class RTCSessionDescriptionRequestImpl final : public RTCSessionDescriptionReque st, public ActiveDOMObject { 47 class RTCSessionDescriptionRequestImpl final : public RTCSessionDescriptionReque st, public ContextLifecycleObserver {
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCSessionDescriptionRequestImpl); 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCSessionDescriptionRequestImpl);
49 public: 49 public:
50 static RTCSessionDescriptionRequestImpl* create(ExecutionContext*, RTCPeerCo nnection*, RTCSessionDescriptionCallback*, RTCPeerConnectionErrorCallback*); 50 static RTCSessionDescriptionRequestImpl* create(ExecutionContext*, RTCPeerCo nnection*, RTCSessionDescriptionCallback*, RTCPeerConnectionErrorCallback*);
51 ~RTCSessionDescriptionRequestImpl() override; 51 ~RTCSessionDescriptionRequestImpl() override;
52 52
53 void requestSucceeded(const WebRTCSessionDescription&) override; 53 void requestSucceeded(const WebRTCSessionDescription&) override;
54 void requestFailed(const String& error) override; 54 void requestFailed(const String& error) override;
55 55
56 // ActiveDOMObject 56 void contextDestroyed() override;
57 void stop() override;
58 57
59 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
60 59
61 private: 60 private:
62 RTCSessionDescriptionRequestImpl(ExecutionContext*, RTCPeerConnection*, RTCS essionDescriptionCallback*, RTCPeerConnectionErrorCallback*); 61 RTCSessionDescriptionRequestImpl(ExecutionContext*, RTCPeerConnection*, RTCS essionDescriptionCallback*, RTCPeerConnectionErrorCallback*);
63 62
64 void clear(); 63 void clear();
65 64
66 Member<RTCSessionDescriptionCallback> m_successCallback; 65 Member<RTCSessionDescriptionCallback> m_successCallback;
67 Member<RTCPeerConnectionErrorCallback> m_errorCallback; 66 Member<RTCPeerConnectionErrorCallback> m_errorCallback;
68 Member<RTCPeerConnection> m_requester; 67 Member<RTCPeerConnection> m_requester;
69 }; 68 };
70 69
71 } // namespace blink 70 } // namespace blink
72 71
73 #endif // RTCSessionDescriptionRequestImpl_h 72 #endif // RTCSessionDescriptionRequestImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698