| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void refreshClosedCaptionsButtonVisibility(); | 60 void refreshClosedCaptionsButtonVisibility(); |
| 61 | 61 |
| 62 void enteredFullscreen(); | 62 void enteredFullscreen(); |
| 63 void exitedFullscreen(); | 63 void exitedFullscreen(); |
| 64 | 64 |
| 65 void startedCasting(); | 65 void startedCasting(); |
| 66 void stoppedCasting(); | 66 void stoppedCasting(); |
| 67 void refreshCastButtonVisibility(); | 67 void refreshCastButtonVisibility(); |
| 68 void showOverlayCastButton(); | 68 void showOverlayCastButton(); |
| 69 | 69 |
| 70 void updateTextTrackDisplay(); | |
| 71 | |
| 72 void mediaElementFocused(); | 70 void mediaElementFocused(); |
| 73 | 71 |
| 74 DECLARE_VIRTUAL_TRACE(); | 72 DECLARE_VIRTUAL_TRACE(); |
| 75 | 73 |
| 76 private: | 74 private: |
| 77 explicit MediaControls(HTMLMediaElement&); | 75 explicit MediaControls(HTMLMediaElement&); |
| 78 | 76 |
| 79 void initializeControls(); | 77 void initializeControls(); |
| 80 | 78 |
| 81 void makeOpaque(); | 79 void makeOpaque(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 93 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; | 91 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; |
| 94 void hideMediaControlsTimerFired(Timer<MediaControls>*); | 92 void hideMediaControlsTimerFired(Timer<MediaControls>*); |
| 95 void startHideMediaControlsTimer(); | 93 void startHideMediaControlsTimer(); |
| 96 void stopHideMediaControlsTimer(); | 94 void stopHideMediaControlsTimer(); |
| 97 void resetHideMediaControlsTimer(); | 95 void resetHideMediaControlsTimer(); |
| 98 | 96 |
| 99 // Attempts to show the overlay cast button. If it is covered by another | 97 // Attempts to show the overlay cast button. If it is covered by another |
| 100 // element in the page, it will be hidden. | 98 // element in the page, it will be hidden. |
| 101 void tryShowOverlayCastButton(); | 99 void tryShowOverlayCastButton(); |
| 102 | 100 |
| 103 void createTextTrackDisplay(); | |
| 104 | |
| 105 // Node | 101 // Node |
| 106 virtual bool isMediaControls() const override { return true; } | 102 virtual bool isMediaControls() const override { return true; } |
| 107 virtual bool willRespondToMouseMoveEvents() override { return true; } | 103 virtual bool willRespondToMouseMoveEvents() override { return true; } |
| 108 virtual void defaultEventHandler(Event*) override; | 104 virtual void defaultEventHandler(Event*) override; |
| 109 bool containsRelatedTarget(Event*); | 105 bool containsRelatedTarget(Event*); |
| 110 | 106 |
| 111 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; | 107 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; |
| 112 | 108 |
| 113 // Container for the media control elements. | 109 // Container for the media control elements. |
| 114 RawPtrWillBeMember<MediaControlPanelElement> m_panel; | 110 RawPtrWillBeMember<MediaControlPanelElement> m_panel; |
| 115 | 111 |
| 116 // Container for the text track cues. | |
| 117 RawPtrWillBeMember<MediaControlTextTrackContainerElement> m_textDisplayConta
iner; | |
| 118 | |
| 119 // Media control elements. | 112 // Media control elements. |
| 120 RawPtrWillBeMember<MediaControlOverlayPlayButtonElement> m_overlayPlayButton
; | 113 RawPtrWillBeMember<MediaControlOverlayPlayButtonElement> m_overlayPlayButton
; |
| 121 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; | 114 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; |
| 122 RawPtrWillBeMember<MediaControlPlayButtonElement> m_playButton; | 115 RawPtrWillBeMember<MediaControlPlayButtonElement> m_playButton; |
| 123 RawPtrWillBeMember<MediaControlCurrentTimeDisplayElement> m_currentTimeDispl
ay; | 116 RawPtrWillBeMember<MediaControlCurrentTimeDisplayElement> m_currentTimeDispl
ay; |
| 124 RawPtrWillBeMember<MediaControlTimelineElement> m_timeline; | 117 RawPtrWillBeMember<MediaControlTimelineElement> m_timeline; |
| 125 RawPtrWillBeMember<MediaControlMuteButtonElement> m_muteButton; | 118 RawPtrWillBeMember<MediaControlMuteButtonElement> m_muteButton; |
| 126 RawPtrWillBeMember<MediaControlVolumeSliderElement> m_volumeSlider; | 119 RawPtrWillBeMember<MediaControlVolumeSliderElement> m_volumeSlider; |
| 127 RawPtrWillBeMember<MediaControlToggleClosedCaptionsButtonElement> m_toggleCl
osedCaptionsButton; | 120 RawPtrWillBeMember<MediaControlToggleClosedCaptionsButtonElement> m_toggleCl
osedCaptionsButton; |
| 128 RawPtrWillBeMember<MediaControlFullscreenButtonElement> m_fullScreenButton; | 121 RawPtrWillBeMember<MediaControlFullscreenButtonElement> m_fullScreenButton; |
| 129 RawPtrWillBeMember<MediaControlCastButtonElement> m_castButton; | 122 RawPtrWillBeMember<MediaControlCastButtonElement> m_castButton; |
| 130 RawPtrWillBeMember<MediaControlCastButtonElement> m_overlayCastButton; | 123 RawPtrWillBeMember<MediaControlCastButtonElement> m_overlayCastButton; |
| 131 RawPtrWillBeMember<MediaControlTimeRemainingDisplayElement> m_durationDispla
y; | 124 RawPtrWillBeMember<MediaControlTimeRemainingDisplayElement> m_durationDispla
y; |
| 132 RawPtrWillBeMember<MediaControlPanelEnclosureElement> m_enclosure; | 125 RawPtrWillBeMember<MediaControlPanelEnclosureElement> m_enclosure; |
| 133 | 126 |
| 134 Timer<MediaControls> m_hideMediaControlsTimer; | 127 Timer<MediaControls> m_hideMediaControlsTimer; |
| 135 unsigned m_hideTimerBehaviorFlags; | 128 unsigned m_hideTimerBehaviorFlags; |
| 136 bool m_isMouseOverControls : 1; | 129 bool m_isMouseOverControls : 1; |
| 137 bool m_isPausedForScrubbing : 1; | 130 bool m_isPausedForScrubbing : 1; |
| 138 }; | 131 }; |
| 139 | 132 |
| 140 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 133 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
| 141 | 134 |
| 142 } | 135 } |
| 143 | 136 |
| 144 #endif | 137 #endif |
| OLD | NEW |