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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaStream.cpp

Issue 1954693002: Deprecate subscriptions to MediaStream ended event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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: third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
index 24ef0ac0a7952429e517773fac4dffa481e622e2..fd3695aceb6702d7765f46d198d5138b6a5cfa65 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
@@ -27,6 +27,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
+#include "core/frame/Deprecation.h"
#include "modules/mediastream/MediaStreamRegistry.h"
#include "modules/mediastream/MediaStreamTrackEvent.h"
#include "platform/mediastream/MediaStreamCenter.h"
@@ -301,6 +302,14 @@ void MediaStream::streamEnded()
}
}
+bool MediaStream::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptions& options)
+{
+ if (eventType == EventTypeNames::ended)
+ Deprecation::countDeprecation(getExecutionContext(), UseCounter::MediaStreamOnEnded);
+
+ return EventTargetWithInlineData::addEventListenerInternal(eventType, listener, options);
+}
+
void MediaStream::contextDestroyed()
{
ContextLifecycleObserver::contextDestroyed();

Powered by Google App Engine
This is Rietveld 408576698