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

Unified Diff: third_party/WebKit/Source/core/streams/Stream.h

Issue 1808533003: Revert of Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp ('k') | third_party/WebKit/Source/core/streams/Stream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698