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

Unified Diff: third_party/WebKit/Source/modules/media_controls/elements/MediaControlTextTrackListElement.h

Issue 2810173003: Media Controls: move all MediaControlDivElement sub-classes to modules/. (Closed)
Patch Set: fix typo Created 3 years, 8 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/modules/media_controls/elements/MediaControlTextTrackListElement.h
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTextTrackListElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTextTrackListElement.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d56453933cd14dc43f431172bde718a6ac4e74a
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTextTrackListElement.h
@@ -0,0 +1,42 @@
+// Copyright 2017 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 MediaControlTextTrackListElement_h
+#define MediaControlTextTrackListElement_h
+
+#include "core/html/shadow/MediaControlElementTypes.h"
+
+namespace blink {
+
+class Event;
+class MediaControlsImpl;
+class TextTrack;
+
+class MediaControlTextTrackListElement final : public MediaControlDivElement {
+ public:
+ explicit MediaControlTextTrackListElement(MediaControlsImpl&);
+
+ // Node interface.
+ bool WillRespondToMouseClickEvents() override;
+
+ // Toggle visibility of the list.
+ void SetVisible(bool);
+
+ private:
+ void DefaultEventHandler(Event*) override;
+
+ void RefreshTextTrackListMenu();
+
+ // Returns the label for the track when a valid track is passed in and "Off"
+ // when the parameter is null.
+ String GetTextTrackLabel(TextTrack*);
+
+ // Creates the track element in the list when a valid track is passed in and
+ // the "Off" item when the parameter is null.
+ Element* CreateTextTrackListItem(TextTrack*);
+};
+
+} // namespace blink
+
+#endif // MediaControlTextTrackListElement_h

Powered by Google App Engine
This is Rietveld 408576698