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 13 matching lines...) Expand all Loading... |
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 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/ExceptionCode.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "platform/mediastream/RTCVoidRequest.h" | 36 #include "platform/mediastream/RTCVoidRequest.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class RTCErrorCallback; | |
41 class RTCPeerConnection; | 40 class RTCPeerConnection; |
| 41 class RTCPeerConnectionErrorCallback; |
42 class VoidCallback; | 42 class VoidCallback; |
43 | 43 |
44 class RTCVoidRequestImpl final : public RTCVoidRequest, public ActiveDOMObject { | 44 class RTCVoidRequestImpl final : public RTCVoidRequest { |
45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCVoidRequestImpl); | |
46 public: | 45 public: |
47 static RTCVoidRequestImpl* create(ExecutionContext*, RTCPeerConnection*, Voi
dCallback*, RTCErrorCallback*); | 46 static RTCVoidRequestImpl* create(RTCPeerConnection*, VoidCallback*, RTCPeer
ConnectionErrorCallback*, ExceptionCode); |
48 ~RTCVoidRequestImpl() override; | 47 ~RTCVoidRequestImpl() override; |
49 | 48 |
50 // RTCVoidRequest | 49 // RTCVoidRequest |
51 void requestSucceeded() override; | 50 void requestSucceeded() override; |
52 void requestFailed(const String& error) override; | 51 void requestFailed(const String& error) override; |
53 | 52 |
54 // ActiveDOMObject | |
55 void stop() override; | |
56 | |
57 DECLARE_VIRTUAL_TRACE(); | 53 DECLARE_VIRTUAL_TRACE(); |
58 | 54 |
59 private: | 55 private: |
60 RTCVoidRequestImpl(ExecutionContext*, RTCPeerConnection*, VoidCallback*, RTC
ErrorCallback*); | 56 RTCVoidRequestImpl(RTCPeerConnection*, VoidCallback*, RTCPeerConnectionError
Callback*, ExceptionCode); |
61 | 57 |
62 void clear(); | 58 void clear(); |
63 | 59 |
64 Member<VoidCallback> m_successCallback; | 60 Member<VoidCallback> m_successCallback; |
65 Member<RTCErrorCallback> m_errorCallback; | 61 Member<RTCPeerConnectionErrorCallback> m_errorCallback; |
| 62 ExceptionCode m_exceptionCode; |
66 Member<RTCPeerConnection> m_requester; | 63 Member<RTCPeerConnection> m_requester; |
67 }; | 64 }; |
68 | 65 |
69 } // namespace blink | 66 } // namespace blink |
70 | 67 |
71 #endif // RTCVoidRequestImpl_h | 68 #endif // RTCVoidRequestImpl_h |
OLD | NEW |