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

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

Issue 329093002: Allow PeerConnection to be garbage collected after close(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use ref counting for pending activity for a async operations. Created 6 years, 6 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 19 matching lines...) Expand all
30 30
31 #ifndef RTCVoidRequestImpl_h 31 #ifndef RTCVoidRequestImpl_h
32 #define RTCVoidRequestImpl_h 32 #define RTCVoidRequestImpl_h
33 33
34 #include "core/dom/ActiveDOMObject.h" 34 #include "core/dom/ActiveDOMObject.h"
35 #include "platform/mediastream/RTCVoidRequest.h" 35 #include "platform/mediastream/RTCVoidRequest.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class RTCErrorCallback; 39 class RTCErrorCallback;
40 class RTCPeerConnection;
40 class VoidCallback; 41 class VoidCallback;
41 42
42 class RTCVoidRequestImpl FINAL : public RTCVoidRequest, public ActiveDOMObject { 43 class RTCVoidRequestImpl FINAL : public RTCVoidRequest, public ActiveDOMObject {
43 public: 44 public:
44 static PassRefPtr<RTCVoidRequestImpl> create(ExecutionContext*, PassOwnPtr<V oidCallback>, PassOwnPtr<RTCErrorCallback>); 45 static PassRefPtr<RTCVoidRequestImpl> create(ExecutionContext*, RTCPeerConne ction*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>);
45 virtual ~RTCVoidRequestImpl(); 46 virtual ~RTCVoidRequestImpl();
46 47
47 // RTCVoidRequest 48 // RTCVoidRequest
48 virtual void requestSucceeded() OVERRIDE; 49 virtual void requestSucceeded() OVERRIDE;
49 virtual void requestFailed(const String& error) OVERRIDE; 50 virtual void requestFailed(const String& error) OVERRIDE;
50 51
51 // ActiveDOMObject 52 // ActiveDOMObject
52 virtual void stop() OVERRIDE; 53 virtual void stop() OVERRIDE;
53 54
54 private: 55 private:
55 RTCVoidRequestImpl(ExecutionContext*, PassOwnPtr<VoidCallback>, PassOwnPtr<R TCErrorCallback>); 56 RTCVoidRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<VoidCal lback>, PassOwnPtr<RTCErrorCallback>);
56 57
57 void clear(); 58 void clear();
58 59
59 OwnPtr<VoidCallback> m_successCallback; 60 OwnPtr<VoidCallback> m_successCallback;
60 OwnPtr<RTCErrorCallback> m_errorCallback; 61 OwnPtr<RTCErrorCallback> m_errorCallback;
62
63 // TODO - BEFORE COMMIT: Raw pointer OK?
64 RTCPeerConnection* m_requester;
61 }; 65 };
62 66
63 } // namespace WebCore 67 } // namespace WebCore
64 68
65 #endif // RTCVoidRequestImpl_h 69 #endif // RTCVoidRequestImpl_h
66 70
67 71
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698