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 14 matching lines...) Expand all Loading... |
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 RTCSessionDescription_h | 31 #ifndef RTCSessionDescription_h |
32 #define RTCSessionDescription_h | 32 #define RTCSessionDescription_h |
33 | 33 |
34 #include "bindings/core/v8/ScriptWrappable.h" | 34 #include "bindings/core/v8/ScriptWrappable.h" |
| 35 #include "core/dom/ActiveDOMObject.h" |
35 #include "public/platform/WebRTCSessionDescription.h" | 36 #include "public/platform/WebRTCSessionDescription.h" |
36 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
37 | 38 |
38 namespace blink { | 39 namespace blink { |
39 | 40 |
40 class RTCSessionDescriptionInit; | 41 class RTCSessionDescriptionInit; |
41 class ScriptState; | 42 class ScriptState; |
42 class ScriptValue; | 43 class ScriptValue; |
43 | 44 |
44 class RTCSessionDescription final : public GarbageCollectedFinalized<RTCSessionD
escription>, public ScriptWrappable { | 45 class RTCSessionDescription final |
| 46 : public GarbageCollectedFinalized<RTCSessionDescription> |
| 47 , public ScriptWrappable |
| 48 , public ActiveDOMObject { |
45 DEFINE_WRAPPERTYPEINFO(); | 49 DEFINE_WRAPPERTYPEINFO(); |
46 public: | 50 public: |
47 static RTCSessionDescription* create(const RTCSessionDescriptionInit&); | 51 static RTCSessionDescription* create(ExecutionContext*, const RTCSessionDesc
riptionInit&); |
48 static RTCSessionDescription* create(WebRTCSessionDescription); | 52 static RTCSessionDescription* create(ExecutionContext*, WebRTCSessionDescrip
tion); |
49 | 53 |
50 String type(); | 54 String type(); |
51 void setType(const String&); | 55 void setType(const String&); |
52 | 56 |
53 String sdp(); | 57 String sdp(); |
54 void setSdp(const String&); | 58 void setSdp(const String&); |
55 | 59 |
56 ScriptValue toJSONForBinding(ScriptState*); | 60 ScriptValue toJSONForBinding(ScriptState*); |
57 | 61 |
58 WebRTCSessionDescription webSessionDescription(); | 62 WebRTCSessionDescription webSessionDescription(); |
| 63 void setWebSessionDescription(WebRTCSessionDescription); |
59 | 64 |
60 DEFINE_INLINE_TRACE() { } | 65 // ActiveDOMObject |
| 66 bool hasPendingActivity() const override; |
| 67 void stop() override; |
| 68 |
| 69 DECLARE_VIRTUAL_TRACE(); |
61 | 70 |
62 private: | 71 private: |
63 explicit RTCSessionDescription(WebRTCSessionDescription); | 72 RTCSessionDescription(ExecutionContext*, WebRTCSessionDescription); |
64 | 73 |
65 WebRTCSessionDescription m_webSessionDescription; | 74 WebRTCSessionDescription m_webSessionDescription; |
66 }; | 75 }; |
67 | 76 |
68 } // namespace blink | 77 } // namespace blink |
69 | 78 |
70 #endif // RTCSessionDescription_h | 79 #endif // RTCSessionDescription_h |
OLD | NEW |