| 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 MediaControls_h | 5 #ifndef MediaControls_h |
| 6 #define MediaControls_h | 6 #define MediaControls_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/heap/Visitor.h" | 10 #include "platform/heap/Visitor.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class Document; | 14 class Document; |
| 15 class HTMLDivElement; |
| 15 class HTMLMediaElement; | 16 class HTMLMediaElement; |
| 16 class LayoutObject; | 17 class LayoutObject; |
| 17 class MediaControlPanelElement; | |
| 18 class ShadowRoot; | 18 class ShadowRoot; |
| 19 | 19 |
| 20 // MediaControls is an interface to abstract the HTMLMediaElement controls. The | 20 // MediaControls is an interface to abstract the HTMLMediaElement controls. The |
| 21 // implementation will be used using a Factory (see below). | 21 // implementation will be used using a Factory (see below). |
| 22 class CORE_EXPORT MediaControls : public GarbageCollectedMixin { | 22 class CORE_EXPORT MediaControls : public GarbageCollectedMixin { |
| 23 public: | 23 public: |
| 24 // Factory class that HTMLMediaElement uses to create the MediaControls | 24 // Factory class that HTMLMediaElement uses to create the MediaControls |
| 25 // instance. MediaControls implementations are expected to implement a factory | 25 // instance. MediaControls implementations are expected to implement a factory |
| 26 // class and provide an implementation of it to HTMLMediaElement via | 26 // class and provide an implementation of it to HTMLMediaElement via |
| 27 // `::registerMediaControlsFactory()`. | 27 // `::registerMediaControlsFactory()`. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // used for overlap checking during text track layout. May be null. | 65 // used for overlap checking during text track layout. May be null. |
| 66 // TODO(mlamouri): required by LayoutVTTCue. | 66 // TODO(mlamouri): required by LayoutVTTCue. |
| 67 virtual LayoutObject* PanelLayoutObject() = 0; | 67 virtual LayoutObject* PanelLayoutObject() = 0; |
| 68 // Returns the layout object of the media controls container. Maybe null. | 68 // Returns the layout object of the media controls container. Maybe null. |
| 69 // TODO(mlamouri): required by LayoutVTTCue. | 69 // TODO(mlamouri): required by LayoutVTTCue. |
| 70 virtual LayoutObject* ContainerLayoutObject() = 0; | 70 virtual LayoutObject* ContainerLayoutObject() = 0; |
| 71 | 71 |
| 72 // TODO: the following are required by other parts of the media controls | 72 // TODO: the following are required by other parts of the media controls |
| 73 // implementation and could be removed when the full implementation has moved | 73 // implementation and could be removed when the full implementation has moved |
| 74 // to modules. | 74 // to modules. |
| 75 virtual MediaControlPanelElement* PanelElement() = 0; | 75 virtual HTMLDivElement* PanelElement() = 0; |
| 76 virtual Document& OwnerDocument() = 0; | 76 virtual Document& OwnerDocument() = 0; |
| 77 virtual void BeginScrubbing() = 0; | 77 virtual void BeginScrubbing() = 0; |
| 78 virtual void EndScrubbing() = 0; | 78 virtual void EndScrubbing() = 0; |
| 79 virtual void UpdateCurrentTimeDisplay() = 0; | 79 virtual void UpdateCurrentTimeDisplay() = 0; |
| 80 virtual void ToggleTextTrackList() = 0; | 80 virtual void ToggleTextTrackList() = 0; |
| 81 virtual void ShowTextTrackAtIndex(unsigned) = 0; | 81 virtual void ShowTextTrackAtIndex(unsigned) = 0; |
| 82 virtual void DisableShowingTextTracks() = 0; | 82 virtual void DisableShowingTextTracks() = 0; |
| 83 virtual void EnterFullscreen() = 0; | 83 virtual void EnterFullscreen() = 0; |
| 84 virtual void ExitFullscreen() = 0; | 84 virtual void ExitFullscreen() = 0; |
| 85 virtual void ToggleOverflowMenu() = 0; | 85 virtual void ToggleOverflowMenu() = 0; |
| 86 virtual bool OverflowMenuVisible() = 0; | 86 virtual bool OverflowMenuVisible() = 0; |
| 87 virtual void OnMediaControlsEnabledChange() = 0; | 87 virtual void OnMediaControlsEnabledChange() = 0; |
| 88 | 88 |
| 89 DECLARE_VIRTUAL_TRACE(); | 89 DECLARE_VIRTUAL_TRACE(); |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 Member<HTMLMediaElement> media_element_; | 92 Member<HTMLMediaElement> media_element_; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| 96 | 96 |
| 97 #endif // MediaControls_h | 97 #endif // MediaControls_h |
| OLD | NEW |