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

Unified Diff: Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 621903003: Add MediaKeySession.expiration attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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/modules/encryptedmedia/MediaKeySession.h ('k') | Source/modules/encryptedmedia/MediaKeySession.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp
index 42cd37150c9b8856b6950f2b09a7ff68e2ccb3ad..4d603a63d2f17c2f0645474d7ae1e8c72324a61a 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>
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());
@@ -607,7 +610,7 @@ void MediaKeySession::error(WebContentDecryptionModuleException exception, unsig
void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS)
{
- // FIXME: Implement expiration attribute.
+ m_expiration = updatedExpiryTimeInMS;
}
const AtomicString& MediaKeySession::interfaceName() const
« no previous file with comments | « Source/modules/encryptedmedia/MediaKeySession.h ('k') | Source/modules/encryptedmedia/MediaKeySession.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698