diff options
Diffstat (limited to 'Source/WebCore/html/shadow/MediaControls.h')
-rw-r--r-- | Source/WebCore/html/shadow/MediaControls.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/Source/WebCore/html/shadow/MediaControls.h b/Source/WebCore/html/shadow/MediaControls.h index 47124cfef..72c1ec61d 100644 --- a/Source/WebCore/html/shadow/MediaControls.h +++ b/Source/WebCore/html/shadow/MediaControls.h @@ -11,10 +11,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -24,8 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MediaControls_h -#define MediaControls_h +#pragma once #if ENABLE(VIDEO) @@ -33,7 +32,6 @@ #include "HTMLDivElement.h" #include "MediaControlElements.h" #include "MouseEvent.h" -#include "Page.h" #include "RenderTheme.h" #include "Text.h" #include <wtf/RefPtr.h> @@ -46,7 +44,6 @@ namespace WebCore { class Document; class Event; -class Page; class MediaPlayer; class RenderBox; @@ -59,7 +56,7 @@ class MediaControls : public HTMLDivElement { // This function is to be implemented in your port-specific media // controls implementation since it will return a child instance. - static PassRefPtr<MediaControls> create(Document&); + static RefPtr<MediaControls> tryCreate(Document&); virtual void setMediaController(MediaControllerInterface*); @@ -94,10 +91,10 @@ class MediaControls : public HTMLDivElement { virtual void exitedFullscreen(); #if !PLATFORM(IOS) - virtual bool willRespondToMouseMoveEvents() override { return true; } + bool willRespondToMouseMoveEvents() override { return true; } #endif - virtual void hideFullscreenControlsTimerFired(Timer<MediaControls>&); + virtual void hideFullscreenControlsTimerFired(); virtual void startHideFullscreenControlsTimer(); virtual void stopHideFullscreenControlsTimer(); @@ -112,9 +109,9 @@ class MediaControls : public HTMLDivElement { protected: explicit MediaControls(Document&); - virtual void defaultEventHandler(Event*) override; + void defaultEventHandler(Event&) override; - virtual bool containsRelatedTarget(Event*); + virtual bool containsRelatedTarget(Event&); void setSliderVolume(); @@ -137,14 +134,12 @@ protected: MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton; MediaControlFullscreenButtonElement* m_fullScreenButton; - Timer<MediaControls> m_hideFullscreenControlsTimer; + Timer m_hideFullscreenControlsTimer; bool m_isFullscreen; bool m_isMouseOverControls; private: - virtual bool isMediaControls() const override { return true; } - - virtual const AtomicString& shadowPseudoId() const override; + bool isMediaControls() const final { return true; } }; inline MediaControls* toMediaControls(Node* node) @@ -156,8 +151,6 @@ inline MediaControls* toMediaControls(Node* node) // This will catch anyone doing an unneccessary cast. void toMediaControls(const MediaControls*); -} +} // namespace WebCore -#endif - -#endif +#endif // ENABLE(VIDEO) |