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

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

Issue 858693002: Add MediaKeySession.keystatuseschange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
Index: Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp
index 4215ba392aa3d2dfdf5985afa6177cb3b636017f..954202da58fafceba4828b6952a881b0890d4494 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -47,6 +47,7 @@
#include "public/platform/WebContentDecryptionModule.h"
#include "public/platform/WebContentDecryptionModuleException.h"
#include "public/platform/WebContentDecryptionModuleSession.h"
+#include "public/platform/WebEncryptedMediaKeyInformation.h"
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
#include "wtf/ASCIICType.h"
@@ -855,6 +856,21 @@ void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS)
m_expiration = updatedExpiryTimeInMS;
}
+void MediaKeySession::keysChange(bool hasAdditionalUsableKey, const WebVector<WebEncryptedMediaKeyInformation>& keys)
+{
+ WTF_LOG(Media, "MediaKeySession(%p)::keysChange with %zu keys", this, keys.size());
ddorwin 2015/01/17 00:34:56 nit: should log the bool too
jrummell 2015/01/20 19:46:34 Done.
+
+ RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::keyschange);
+ event->setTarget(this);
+ m_asyncEventQueue->enqueueEvent(event.release());
+
+ // FIXME: Attempt to resume playback if |hasAdditionalUsableKey| is true.
+ // http://crbug.com/413413
+
+ // FIXME: Copy |keys| or whatever is necessary for keyStatuses.
ddorwin 2015/01/17 00:34:56 nit: clarify that this is "the keyStatuses attribu
jrummell 2015/01/20 19:46:34 Done.
+ // http://crbug.com/432671
+}
+
const AtomicString& MediaKeySession::interfaceName() const
{
return EventTargetNames::MediaKeySession;

Powered by Google App Engine
This is Rietveld 408576698