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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h

Issue 2725873002: Media: fix memory leak because of the document holding on an EventListener. (Closed)
Patch Set: event-based Created 3 years, 10 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/core/html/shadow/MediaControlsOrientationLockDelegate.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
index c30cb7b7b4476b4ae9e40e8b34e2c66ab805ed60..cb87959540ba36fdba6d3cbd9eddca2db0a903d6 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
@@ -43,6 +43,15 @@ class CORE_EXPORT MediaControlsOrientationLockDelegate final
public:
explicit MediaControlsOrientationLockDelegate(HTMLVideoElement&);
+ // Called by MediaControls when the HTMLMediaElement is added to a document
+ // document. All event listeners should be added.
+ void attach();
+
+ // Called by MediaControls when the HTMLMediaElement is no longer in the
+ // document. All event listeners should be removed in order to prepare the
+ // object to be garbage collected.
+ void detach();
+
// EventListener implementation.
bool operator==(const EventListener&) const override;

Powered by Google App Engine
This is Rietveld 408576698