Chromium Code Reviews| Index: Source/modules/encryptedmedia/MediaKeySession.cpp |
| diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp |
| index 4efaea52c1e5178feacf03603217b63a5433ca72..cd30eaaff0aa44e111270bdc6aba1b1ccb305122 100644 |
| --- a/Source/modules/encryptedmedia/MediaKeySession.cpp |
| +++ b/Source/modules/encryptedmedia/MediaKeySession.cpp |
| @@ -48,7 +48,6 @@ MediaKeySession::MediaKeySession(ExecutionContext* context, ContentDecryptionMod |
| , m_asyncEventQueue(GenericEventQueue::create(this)) |
| , m_session(cdm->createSession(this)) |
| , m_keys(keys) |
| - , m_initializeNewSessionTimer(this, &MediaKeySession::initializeNewSessionTimerFired) |
| , m_updateTimer(this, &MediaKeySession::updateTimerFired) |
| { |
| ScriptWrappable::init(this); |
| @@ -80,21 +79,9 @@ String MediaKeySession::sessionId() const |
| return m_session->sessionId(); |
| } |
| -void MediaKeySession::initializeNewSession(const String& mimeType, Uint8Array* initData) |
| +void MediaKeySession::initializeNewSession(const String& mimeType, Uint8Array& initData) |
|
acolwell GONE FROM CHROMIUM
2014/01/13 19:37:05
nit: make const&
xhwang
2014/01/14 04:04:11
Done.
|
| { |
| - m_pendingInitializeNewSessionData.append(InitializeNewSessionData(mimeType, initData)); |
| - m_initializeNewSessionTimer.startOneShot(0); |
| -} |
| - |
| -void MediaKeySession::initializeNewSessionTimerFired(Timer<MediaKeySession>*) |
| -{ |
| - ASSERT(m_pendingInitializeNewSessionData.size()); |
| - |
| - while (!m_pendingInitializeNewSessionData.isEmpty()) { |
| - InitializeNewSessionData data = m_pendingInitializeNewSessionData.takeFirst(); |
| - // FIXME: Refer to the spec to see what needs to be done in blink. |
| - m_session->initializeNewSession(data.mimeType, *data.initData); |
| - } |
| + m_session->initializeNewSession(mimeType, initData); |
| } |
| void MediaKeySession::update(Uint8Array* response, ExceptionState& exceptionState) |
| @@ -112,7 +99,9 @@ void MediaKeySession::update(Uint8Array* response, ExceptionState& exceptionStat |
| // 3. Schedule a task to handle the call, providing response. |
| m_pendingKeys.append(response); |
|
ddorwin
2014/01/13 20:20:57
m_pendingUpdate[Message]s?
xhwang
2014/01/14 04:04:11
Done.
|
| - m_updateTimer.startOneShot(0); |
| + |
| + if (!m_updateTimer.isActive()) |
| + m_updateTimer.startOneShot(0); |
| } |
| void MediaKeySession::updateTimerFired(Timer<MediaKeySession>*) |