diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/mediacapturefromelement')
5 files changed, 10 insertions, 18 deletions
diff --git a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.cc b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.cc index c844083b4e0..7b172990c20 100644 --- a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.cc +++ b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.cc @@ -15,7 +15,7 @@ AutoCanvasDrawListener::AutoCanvasDrawListener( // static AutoCanvasDrawListener* AutoCanvasDrawListener::Create( std::unique_ptr<WebCanvasCaptureHandler> handler) { - return new AutoCanvasDrawListener(std::move(handler)); + return MakeGarbageCollected<AutoCanvasDrawListener>(std::move(handler)); } } // namespace blink diff --git a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.h b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.h index 96498511130..343731a02fa 100644 --- a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.h +++ b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/auto_canvas_draw_listener.h @@ -20,12 +20,11 @@ class AutoCanvasDrawListener final public: static AutoCanvasDrawListener* Create( std::unique_ptr<WebCanvasCaptureHandler>); + + AutoCanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); ~AutoCanvasDrawListener() override = default; void Trace(blink::Visitor* visitor) override {} - - private: - AutoCanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_canvas_element_capture.idl b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_canvas_element_capture.idl index 73eb3bb9f6a..4fe2c11c909 100644 --- a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_canvas_element_capture.idl +++ b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_canvas_element_capture.idl @@ -6,5 +6,5 @@ [ ImplementedAs=HTMLCanvasElementCapture ] partial interface HTMLCanvasElement { - [RaisesException, CallWith=ScriptState] MediaStream captureStream (optional double frameRate); + [HighEntropy, MeasureAs=CanvasCaptureStream, RaisesException, CallWith=ScriptState] MediaStream captureStream (optional double frameRate); }; diff --git a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.cc b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.cc index d993c18da1c..feddaea56bf 100644 --- a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.cc +++ b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.cc @@ -8,7 +8,7 @@ #include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/web_media_stream.h" #include "third_party/blink/public/platform/web_media_stream_track.h" -#include "third_party/blink/renderer/core/dom/events/event_listener.h" +#include "third_party/blink/renderer/core/dom/events/native_event_listener.h" #include "third_party/blink/renderer/core/html/media/html_media_element.h" #include "third_party/blink/renderer/core/html/track/audio_track_list.h" #include "third_party/blink/renderer/core/html/track/video_track_list.h" @@ -23,22 +23,17 @@ namespace { // Class to register to the events of |m_mediaElement|, acting accordingly on // the tracks of |m_mediaStream|. -class MediaElementEventListener final : public EventListener { - WTF_MAKE_NONCOPYABLE(MediaElementEventListener); - +class MediaElementEventListener final : public NativeEventListener { public: MediaElementEventListener(HTMLMediaElement*, MediaStream*); void UpdateSources(ExecutionContext*); void Trace(blink::Visitor*) override; - private: // EventListener implementation. void Invoke(ExecutionContext*, Event*) override; - bool operator==(const EventListener& other) const override { - return this == &other; - } + private: Member<HTMLMediaElement> media_element_; Member<MediaStream> media_stream_; HeapHashSet<WeakMember<MediaStreamSource>> sources_; @@ -46,9 +41,7 @@ class MediaElementEventListener final : public EventListener { MediaElementEventListener::MediaElementEventListener(HTMLMediaElement* element, MediaStream* stream) - : EventListener(kCPPEventListenerType), - media_element_(element), - media_stream_(stream) { + : NativeEventListener(), media_element_(element), media_stream_(stream) { UpdateSources(element->GetExecutionContext()); } @@ -169,7 +162,7 @@ MediaStream* HTMLMediaElementCapture::captureStream( MediaStream* stream = MediaStream::Create(context, web_stream); MediaElementEventListener* listener = - new MediaElementEventListener(&element, stream); + MakeGarbageCollected<MediaElementEventListener>(&element, stream); element.addEventListener(event_type_names::kLoadedmetadata, listener, false); element.addEventListener(event_type_names::kEnded, listener, false); diff --git a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.idl b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.idl index f8e28bb90fa..139c10fb935 100644 --- a/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.idl +++ b/chromium/third_party/blink/renderer/modules/mediacapturefromelement/html_media_element_capture.idl @@ -7,5 +7,5 @@ [ ImplementedAs=HTMLMediaElementCapture ] partial interface HTMLMediaElement { - [RaisesException, CallWith=ScriptState] MediaStream captureStream(); + [RaisesException, Measure, CallWith=ScriptState] MediaStream captureStream(); }; |