Chromium Code Reviews| Index: Source/modules/encryptedmedia/MediaKeySession.cpp |
| diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp |
| index f48367f4fac55e88c906e2fa35adba6f6844a900..ee97ea232c317f18b65ea46aae48d9e3144a23c6 100644 |
| --- a/Source/modules/encryptedmedia/MediaKeySession.cpp |
| +++ b/Source/modules/encryptedmedia/MediaKeySession.cpp |
| @@ -49,6 +49,8 @@ |
| #include "public/platform/WebURL.h" |
| #include "wtf/ArrayBuffer.h" |
| #include "wtf/ArrayBufferView.h" |
| +#include <cmath> |
| +#include <limits> |
|
sandersd (OOO until July 31)
2014/10/01 22:57:52
These should be between the two exiting #include b
jrummell
2014/10/03 00:36:10
Blink style guide says this is correct (and the pr
|
| namespace blink { |
| @@ -218,6 +220,7 @@ MediaKeySession::MediaKeySession(ScriptState* scriptState, MediaKeys* mediaKeys, |
| , m_asyncEventQueue(GenericEventQueue::create(this)) |
| , m_mediaKeys(mediaKeys) |
| , m_sessionType(sessionType) |
| + , m_expiration(std::numeric_limits<double>::quiet_NaN()) |
| , m_isUninitialized(true) |
| , m_isCallable(false) |
| , m_isClosed(false) |
| @@ -238,7 +241,7 @@ MediaKeySession::MediaKeySession(ScriptState* scriptState, MediaKeys* mediaKeys, |
| ASSERT(sessionId().isEmpty()); |
| // 2.2 Let the expiration attribute be NaN. |
| - // FIXME: Add expiration property. |
| + ASSERT(std::isnan(m_expiration)); |
| // 2.3 Let the closed attribute be a new promise. |
| ASSERT(!closed(scriptState).isUndefinedOrNull()); |
| @@ -605,6 +608,11 @@ void MediaKeySession::error(WebContentDecryptionModuleException exception, unsig |
| error(errorCode, systemCode); |
| } |
| +void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS) |
| +{ |
| + m_expiration = updatedExpiryTimeInMS; |
| +} |
| + |
| const AtomicString& MediaKeySession::interfaceName() const |
| { |
| return EventTargetNames::MediaKeySession; |