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

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

Issue 686893004: Remove obsolete ready and error events from MediaKeySession. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Completely remove events 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 91960739bc52298fc0aa72f4ff5ce1094c70b127..c92ba2542b3fcb15f2fef1f574685b8ae0b9f631 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -402,11 +402,6 @@ MediaKeySession::~MediaKeySession()
#endif
}
-void MediaKeySession::setError(MediaKeyError* error)
-{
- m_error = error;
-}
-
String MediaKeySession::sessionId() const
{
return m_session->sessionId();
@@ -886,15 +881,6 @@ void MediaKeySession::message(const unsigned char* message, size_t messageLength
m_asyncEventQueue->enqueueEvent(event.release());
}
-void MediaKeySession::ready()
-{
- WTF_LOG(Media, "MediaKeySession(%p)::ready", this);
-
- RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::ready);
ddorwin 2014/11/03 19:50:50 Did we add this event name? If so, we should remov
jrummell 2014/11/03 20:47:32 Done.
- event->setTarget(this);
- m_asyncEventQueue->enqueueEvent(event.release());
-}
-
void MediaKeySession::close()
{
WTF_LOG(Media, "MediaKeySession(%p)::close", this);
@@ -907,54 +893,6 @@ void MediaKeySession::close()
m_closedPromise->resolve(V8UndefinedType());
}
-// Queue a task to fire a simple event named keyadded at the MediaKeySession object.
-void MediaKeySession::error(MediaKeyErrorCode errorCode, unsigned long systemCode)
-{
- WTF_LOG(Media, "MediaKeySession(%p)::error: errorCode=%d, systemCode=%lu", this, errorCode, systemCode);
-
- MediaKeyError::Code mediaKeyErrorCode = MediaKeyError::MEDIA_KEYERR_UNKNOWN;
- switch (errorCode) {
- case MediaKeyErrorCodeUnknown:
- mediaKeyErrorCode = MediaKeyError::MEDIA_KEYERR_UNKNOWN;
- break;
- case MediaKeyErrorCodeClient:
- mediaKeyErrorCode = MediaKeyError::MEDIA_KEYERR_CLIENT;
- break;
- }
-
- // 1. Create a new MediaKeyError object with the following attributes:
- // code = the appropriate MediaKeyError code
- // systemCode = a Key System-specific value, if provided, and 0 otherwise
- // 2. Set the MediaKeySession object's error attribute to the error object created in the previous step.
- m_error = MediaKeyError::create(mediaKeyErrorCode, systemCode);
-
- // 3. queue a task to fire a simple event named keyerror at the MediaKeySession object.
- RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::error);
ddorwin 2014/11/03 19:50:50 ditto
jrummell 2014/11/03 20:47:32 error event used in a bunch of places (e.g. core/e
- event->setTarget(this);
- m_asyncEventQueue->enqueueEvent(event.release());
-}
-
-void MediaKeySession::error(WebContentDecryptionModuleException exception, unsigned long systemCode, const WebString& errorMessage)
-{
- WTF_LOG(Media, "MediaKeySession::error: exception=%d, systemCode=%lu", exception, systemCode);
-
- // FIXME: EME-WD MediaKeyError now derives from DOMException. Figure out how
- // to implement this without breaking prefixed EME, which has a totally
- // different definition. The spec may also change to be just a DOMException.
- // For now, simply generate an existing MediaKeyError.
- MediaKeyErrorCode errorCode;
- switch (exception) {
- case WebContentDecryptionModuleExceptionClientError:
- errorCode = MediaKeyErrorCodeClient;
- break;
- default:
- // All other exceptions get converted into Unknown.
- errorCode = MediaKeyErrorCodeUnknown;
- break;
- }
- error(errorCode, systemCode);
-}
-
void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS)
{
m_expiration = updatedExpiryTimeInMS;
@@ -1000,7 +938,6 @@ void MediaKeySession::stop()
void MediaKeySession::trace(Visitor* visitor)
{
- visitor->trace(m_error);
visitor->trace(m_asyncEventQueue);
visitor->trace(m_pendingActions);
visitor->trace(m_mediaKeys);
« 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