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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp

Issue 2642193009: Move SetMediaKeysHandler timer to frame-specific TaskRunnerTimer. (Closed)
Patch Set: Move SetMediaKeysHandler timer to frame-specific TaskRunnerTimer. Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
index 9f7e9c710b173e7829685c625b8a1ed9516b8641..44f9ad9f2d7c6c7569bee6e6f12091c126d97353 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
@@ -12,6 +12,7 @@
#include "core/dom/DOMException.h"
#include "core/dom/DOMTypedArray.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/html/HTMLMediaElement.h"
#include "modules/encryptedmedia/ContentDecryptionModuleResultPromise.h"
#include "modules/encryptedmedia/EncryptedMediaUtils.h"
@@ -51,7 +52,7 @@ class SetMediaKeysHandler : public ScriptPromiseResolver {
Member<HTMLMediaElement> m_element;
Member<MediaKeys> m_newMediaKeys;
bool m_madeReservation;
- Timer<SetMediaKeysHandler> m_timer;
+ TaskRunnerTimer<SetMediaKeysHandler> m_timer;
};
typedef Function<void()> SuccessCallback;
@@ -123,7 +124,9 @@ SetMediaKeysHandler::SetMediaKeysHandler(ScriptState* scriptState,
m_element(element),
m_newMediaKeys(mediaKeys),
m_madeReservation(false),
- m_timer(this, &SetMediaKeysHandler::timerFired) {
+ m_timer(TaskRunnerHelper::get(TaskType::MiscPlatformAPI, scriptState),
+ this,
+ &SetMediaKeysHandler::timerFired) {
DVLOG(EME_LOG_LEVEL) << __func__;
// 5. Run the following steps in parallel.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698