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

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

Issue 2382233002: Hide overflow menu/closed caption list when clicking outside the list (Closed)
Patch Set: applied Mounir's comments 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
Index: third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h b/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h
new file mode 100644
index 0000000000000000000000000000000000000000..577819da86ceb37ce684c1a2fb6dad623b3c84a9
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MediaControlsWindowEventListener_h
+#define MediaControlsWindowEventListener_h
+
+#include "core/events/EventListener.h"
+#include "wtf/Functional.h"
+
+namespace blink {
+
+class MediaControls;
+class LocalDOMWindow;
+
+class MediaControlsWindowEventListener final : public EventListener {
+ public:
+ using Callback = Function<void(), WTF::SameThreadAffinity>;
+
+ static MediaControlsWindowEventListener* create(MediaControls*,
+ std::unique_ptr<Callback>);
+
+ bool operator==(const EventListener&) const override;
+
+ void start();
+ void stop();
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ explicit MediaControlsWindowEventListener(MediaControls*,
+ std::unique_ptr<Callback>);
+
+ void handleEvent(ExecutionContext*, Event*) override;
+
+ void handleClickEvent();
+
+ LocalDOMWindow* getLocalDOMWindow() const;
+
+ Member<MediaControls> m_mediaControls;
+ std::unique_ptr<Callback> m_callback;
+ bool m_isActive;
+};
+
+} // namespace blink
+
+#endif // MediaControlsWindowEventListener_h

Powered by Google App Engine
This is Rietveld 408576698