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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp

Issue 2414653002: [MediaControls] Hide menus when clicking on some MediaControl elements (Closed)
Patch Set: Created 4 years, 2 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/core/html/shadow/MediaControls.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/core/html/shadow/MediaControlsWindowEventListener.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp
index 4f266eceb3cd9708b378312ee24b463e341769f3..c18500c12359fc92624b9256951c51196f504fc9 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.cpp
@@ -39,6 +39,14 @@ void MediaControlsWindowEventListener::start() {
if (LocalDOMWindow* window = getLocalDOMWindow()) {
window->addEventListener(EventTypeNames::click, this, false);
+ m_mediaControls->panelElement()->addEventListener(EventTypeNames::click,
+ this, false);
+ m_mediaControls->timelineElement()->addEventListener(EventTypeNames::click,
+ this, false);
+ m_mediaControls->castButtonElement()->addEventListener(
+ EventTypeNames::click, this, false);
+ m_mediaControls->volumeSliderElement()->addEventListener(
+ EventTypeNames::click, this, false);
m_isActive = true;
}
}
@@ -47,8 +55,17 @@ void MediaControlsWindowEventListener::stop() {
if (!m_isActive)
return;
- if (LocalDOMWindow* window = getLocalDOMWindow())
+ if (LocalDOMWindow* window = getLocalDOMWindow()) {
window->removeEventListener(EventTypeNames::click, this, false);
+ m_mediaControls->panelElement()->removeEventListener(EventTypeNames::click,
+ this, false);
+ m_mediaControls->timelineElement()->removeEventListener(
+ EventTypeNames::click, this, false);
+ m_mediaControls->castButtonElement()->removeEventListener(
+ EventTypeNames::click, this, false);
+ m_mediaControls->volumeSliderElement()->removeEventListener(
+ EventTypeNames::click, this, false);
+ }
m_isActive = false;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698