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

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

Issue 2140133005: Remove MediaStream ended event from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 b1b1a1907ea0c009259e610b20cff6e45e7a9df3..644b57d689cd3b0f722bf9e21e71fa74c3014586 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
@@ -287,26 +287,18 @@ void MediaStream::trackEnded()
void MediaStream::streamEnded()
{
- if (m_stopped || m_descriptor->ended())
+ if (m_stopped)
return;
if (active()) {
m_descriptor->setActive(false);
scheduleDispatchEvent(Event::create(EventTypeNames::inactive));
}
-
- // TODO(guidou): remove firing of this event. See crbug.com/586924
- if (!m_descriptor->ended()) {
- m_descriptor->setEnded();
- scheduleDispatchEvent(Event::create(EventTypeNames::ended));
- }
}
bool MediaStream::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptions& options)
{
- if (eventType == EventTypeNames::ended)
- Deprecation::countDeprecation(getExecutionContext(), UseCounter::MediaStreamOnEnded);
- else if (eventType == EventTypeNames::active)
+ if (eventType == EventTypeNames::active)
UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnActive);
else if (eventType == EventTypeNames::inactive)
UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnInactive);

Powered by Google App Engine
This is Rietveld 408576698