Index: third_party/WebKit/Source/core/streams/Stream.h |
diff --git a/third_party/WebKit/Source/core/streams/Stream.h b/third_party/WebKit/Source/core/streams/Stream.h |
index d80e61a250944b7f9c10d622bf7a766d34f4f0b8..1e83727b66488e5902673299228b9b79da3d7ba2 100644 |
--- a/third_party/WebKit/Source/core/streams/Stream.h |
+++ b/third_party/WebKit/Source/core/streams/Stream.h |
@@ -33,7 +33,7 @@ |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "core/CoreExport.h" |
-#include "core/dom/ContextLifecycleObserver.h" |
+#include "core/dom/ActiveDOMObject.h" |
#include "platform/heap/Handle.h" |
#include "platform/weborigin/KURL.h" |
#include "wtf/text/WTFString.h" |
@@ -42,20 +42,18 @@ |
class ExecutionContext; |
-class CORE_EXPORT Stream final : public GarbageCollectedFinalized<Stream>, public ScriptWrappable, public ContextLifecycleObserver { |
+class CORE_EXPORT Stream final : public GarbageCollectedFinalized<Stream>, public ScriptWrappable, public ActiveDOMObject { |
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Stream); |
DEFINE_WRAPPERTYPEINFO(); |
public: |
static Stream* create(ExecutionContext* context, const String& mediaType) |
{ |
- return new Stream(context, mediaType); |
+ Stream* stream = new Stream(context, mediaType); |
+ stream->suspendIfNeeded(); |
+ return stream; |
} |
-#if ENABLE(OILPAN) |
- ~Stream(); |
-#else |
~Stream() override; |
-#endif |
// Returns the internal URL referring to this stream. |
const KURL& url() const { return m_internalURL; } |
@@ -79,8 +77,12 @@ |
void neuter() { m_isNeutered = true; } |
bool isNeutered() const { return m_isNeutered; } |
- // TODO(yhirano): Implement suspend()/resume() if necessary. |
- void contextDestroyed() override; |
+ // Implementation of ActiveDOMObject. |
+ // |
+ // FIXME: Implement suspend() and resume() when necessary. |
+ void suspend() override; |
+ void resume() override; |
+ void stop() override; |
DECLARE_VIRTUAL_TRACE(); |