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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.h

Issue 2657723002: [Blink, Media] Added controlsList to HTMLMediaElement (Closed)
Patch Set: Added a link to the spec. Created 3 years, 9 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/HTMLMediaElementControlsList.h
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.h b/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b4d0d613525161c7489fd61231d2e5c6b5b106d
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.h
@@ -0,0 +1,45 @@
+// 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 HTMLMediaElementControlsList_h
+#define HTMLMediaElementControlsList_h
+
+#include "core/dom/DOMTokenList.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class HTMLMediaElement;
+
+class HTMLMediaElementControlsList final : public DOMTokenList,
+ public DOMTokenListObserver {
+ USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementControlsList);
+
+ public:
+ static HTMLMediaElementControlsList* create(HTMLMediaElement* element) {
+ return new HTMLMediaElementControlsList(element);
+ }
+
+ ~HTMLMediaElementControlsList() override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ // Whether the list dictates to hide a certain control.
+ bool shouldHideDownload() const;
+ bool shouldHideFullscreen() const;
+ bool shouldHideRemotePlayback() const;
+
+ private:
+ explicit HTMLMediaElementControlsList(HTMLMediaElement*);
+ bool validateTokenValue(const AtomicString&, ExceptionState&) const override;
+
+ // DOMTokenListObserver.
+ void valueWasSet() override;
+
+ Member<HTMLMediaElement> m_element;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698