OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HTMLMediaElementControlsList_h | 5 #ifndef HTMLMediaElementControlsList_h |
6 #define HTMLMediaElementControlsList_h | 6 #define HTMLMediaElementControlsList_h |
7 | 7 |
| 8 #include "core/CoreExport.h" |
8 #include "core/dom/DOMTokenList.h" | 9 #include "core/dom/DOMTokenList.h" |
9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 class HTMLMediaElement; | 14 class HTMLMediaElement; |
14 | 15 |
15 class HTMLMediaElementControlsList final : public DOMTokenList, | 16 class HTMLMediaElementControlsList final : public DOMTokenList, |
16 public DOMTokenListObserver { | 17 public DOMTokenListObserver { |
17 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementControlsList); | 18 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementControlsList); |
18 | 19 |
19 public: | 20 public: |
20 static HTMLMediaElementControlsList* create(HTMLMediaElement* element) { | 21 static HTMLMediaElementControlsList* create(HTMLMediaElement* element) { |
21 return new HTMLMediaElementControlsList(element); | 22 return new HTMLMediaElementControlsList(element); |
22 } | 23 } |
23 | 24 |
24 ~HTMLMediaElementControlsList() override; | 25 ~HTMLMediaElementControlsList() override; |
25 | 26 |
26 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
27 | 28 |
28 // Whether the list dictates to hide a certain control. | 29 // Whether the list dictates to hide a certain control. |
29 bool shouldHideDownload() const; | 30 CORE_EXPORT bool shouldHideDownload() const; |
30 bool shouldHideFullscreen() const; | 31 CORE_EXPORT bool shouldHideFullscreen() const; |
31 bool shouldHideRemotePlayback() const; | 32 CORE_EXPORT bool shouldHideRemotePlayback() const; |
32 | 33 |
33 private: | 34 private: |
34 explicit HTMLMediaElementControlsList(HTMLMediaElement*); | 35 explicit HTMLMediaElementControlsList(HTMLMediaElement*); |
35 bool validateTokenValue(const AtomicString&, ExceptionState&) const override; | 36 bool validateTokenValue(const AtomicString&, ExceptionState&) const override; |
36 | 37 |
37 // DOMTokenListObserver. | 38 // DOMTokenListObserver. |
38 void valueWasSet() override; | 39 void valueWasSet() override; |
39 | 40 |
40 Member<HTMLMediaElement> m_element; | 41 Member<HTMLMediaElement> m_element; |
41 }; | 42 }; |
42 | 43 |
43 } // namespace blink | 44 } // namespace blink |
44 | 45 |
45 #endif | 46 #endif |
OLD | NEW |