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

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: 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
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/MediaStream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a3a84a69708032fc04e97d69d3b2721e9b043ab4 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/UseCounter.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 EventListenerOptions& options)
+{
+ if (eventType == EventTypeNames::ended)
+ UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnEnded);
+
+ return EventTarget::addEventListenerInternal(eventType, listener, options);
Rick Byers 2016/05/05 14:08:57 nit: This should probably be "EventTargetWithInlin
+}
+
void MediaStream::contextDestroyed()
{
ContextLifecycleObserver::contextDestroyed();
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/MediaStream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698