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 19 matching lines...) Expand all Loading... | |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "modules/mediastream/RTCSessionDescription.h" | 32 #include "modules/mediastream/RTCSessionDescription.h" |
33 | 33 |
34 #include "bindings/core/v8/ScriptValue.h" | 34 #include "bindings/core/v8/ScriptValue.h" |
35 #include "bindings/core/v8/V8ObjectBuilder.h" | 35 #include "bindings/core/v8/V8ObjectBuilder.h" |
36 #include "modules/mediastream/RTCSessionDescriptionInit.h" | 36 #include "modules/mediastream/RTCSessionDescriptionInit.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 RTCSessionDescription* RTCSessionDescription::create(const RTCSessionDescription Init& descriptionInitDict) | 40 RTCSessionDescription* RTCSessionDescription::create(ExecutionContext* context, const RTCSessionDescriptionInit& descriptionInitDict) |
41 { | 41 { |
42 String type; | 42 String type; |
43 if (descriptionInitDict.hasType()) | 43 if (descriptionInitDict.hasType()) |
44 type = descriptionInitDict.type(); | 44 type = descriptionInitDict.type(); |
45 | 45 |
46 String sdp; | 46 String sdp; |
47 if (descriptionInitDict.hasSdp()) | 47 if (descriptionInitDict.hasSdp()) |
48 sdp = descriptionInitDict.sdp(); | 48 sdp = descriptionInitDict.sdp(); |
49 | 49 |
50 return new RTCSessionDescription(WebRTCSessionDescription(type, sdp)); | 50 return new RTCSessionDescription(context, WebRTCSessionDescription(type, sdp )); |
51 } | 51 } |
52 | 52 |
53 RTCSessionDescription* RTCSessionDescription::create(WebRTCSessionDescription we bSessionDescription) | 53 RTCSessionDescription* RTCSessionDescription::create(ExecutionContext* context, WebRTCSessionDescription webSessionDescription) |
54 { | 54 { |
55 return new RTCSessionDescription(webSessionDescription); | 55 return new RTCSessionDescription(context, webSessionDescription); |
56 } | 56 } |
57 | 57 |
58 RTCSessionDescription::RTCSessionDescription(WebRTCSessionDescription webSession Description) | 58 RTCSessionDescription::RTCSessionDescription(ExecutionContext* context, WebRTCSe ssionDescription webSessionDescription) |
59 : m_webSessionDescription(webSessionDescription) | 59 : ActiveDOMObject(context) |
60 , m_webSessionDescription(webSessionDescription) | |
60 { | 61 { |
61 } | 62 } |
62 | 63 |
63 String RTCSessionDescription::type() | 64 String RTCSessionDescription::type() |
64 { | 65 { |
65 return m_webSessionDescription.type(); | 66 return m_webSessionDescription.type(); |
66 } | 67 } |
67 | 68 |
68 void RTCSessionDescription::setType(const String& type) | 69 void RTCSessionDescription::setType(const String& type) |
69 { | 70 { |
(...skipping 22 matching lines...) Expand all Loading... | |
92 else | 93 else |
93 result.addString("sdp", sdp()); | 94 result.addString("sdp", sdp()); |
94 return result.scriptValue(); | 95 return result.scriptValue(); |
95 } | 96 } |
96 | 97 |
97 WebRTCSessionDescription RTCSessionDescription::webSessionDescription() | 98 WebRTCSessionDescription RTCSessionDescription::webSessionDescription() |
98 { | 99 { |
99 return m_webSessionDescription; | 100 return m_webSessionDescription; |
100 } | 101 } |
101 | 102 |
103 void RTCSessionDescription::setWebSessionDescription(WebRTCSessionDescription we bSessionDescription) | |
104 { | |
105 m_webSessionDescription = webSessionDescription; | |
106 } | |
107 | |
108 bool RTCSessionDescription::hasPendingActivity() const | |
109 { | |
110 return false; | |
jochen (gone - plz use gerrit)
2015/04/22 14:48:40
hasPendingActivity should return true as long as t
changbin
2015/04/24 09:22:33
Then one factor that determines RTCSessionDescript
| |
111 } | |
112 | |
113 void RTCSessionDescription::stop() | |
114 { | |
115 } | |
116 | |
117 DEFINE_TRACE(RTCSessionDescription) | |
118 { | |
119 ActiveDOMObject::trace(visitor); | |
120 } | |
121 | |
102 } // namespace blink | 122 } // namespace blink |
OLD | NEW |