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

Unified Diff: Source/modules/mediasource/SourceBuffer.h

Issue 27571005: Replace Timers used in ActiveDOMObject with AsyncMethodRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/SourceBuffer.h
diff --git a/Source/modules/mediasource/SourceBuffer.h b/Source/modules/mediasource/SourceBuffer.h
index 2b3c7f0f57d8fbd0b7de3d3186ff29681b9cc72a..abdb5ee90807690299666f90f768410ccb83ef3b 100644
--- a/Source/modules/mediasource/SourceBuffer.h
+++ b/Source/modules/mediasource/SourceBuffer.h
@@ -36,7 +36,7 @@
#include "core/events/EventTarget.h"
#include "core/fileapi/FileReaderLoaderClient.h"
#include "core/platform/graphics/SourceBufferPrivate.h"
-#include "platform/Timer.h"
+#include "platform/AsyncMethodRunner.h"
#include "weborigin/KURL.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
@@ -82,6 +82,8 @@ public:
// ActiveDOMObject interface
virtual bool hasPendingActivity() const OVERRIDE;
+ virtual void suspend() OVERRIDE;
+ virtual void resume() OVERRIDE;
virtual void stop() OVERRIDE;
// EventTarget interface
@@ -95,12 +97,12 @@ private:
void scheduleEvent(const AtomicString& eventName);
void appendBufferInternal(const unsigned char*, unsigned, ExceptionState&);
- void appendBufferTimerFired(Timer<SourceBuffer>*);
+ void appendBufferAsyncPart();
- void removeTimerFired(Timer<SourceBuffer>*);
+ void removeAsyncPart();
void appendStreamInternal(PassRefPtr<Stream>, ExceptionState&);
- void appendStreamTimerFired(Timer<SourceBuffer>*);
+ void appendStreamAsyncPart();
void appendStreamDone(bool success);
void clearAppendStreamState();
@@ -120,15 +122,15 @@ private:
double m_appendWindowEnd;
Vector<unsigned char> m_pendingAppendData;
- Timer<SourceBuffer> m_appendBufferTimer;
+ AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner;
double m_pendingRemoveStart;
double m_pendingRemoveEnd;
- Timer<SourceBuffer> m_removeTimer;
+ AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner;
bool m_streamMaxSizeValid;
unsigned long long m_streamMaxSize;
- Timer<SourceBuffer> m_appendStreamTimer;
+ AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner;
RefPtr<Stream> m_stream;
OwnPtr<FileReaderLoader> m_loader;
};
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698