| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void show(); | 47 void show(); |
| 48 void hide(); | 48 void hide(); |
| 49 bool isVisible() const; | 49 bool isVisible() const; |
| 50 | 50 |
| 51 void beginScrubbing(); | 51 void beginScrubbing(); |
| 52 void endScrubbing(); | 52 void endScrubbing(); |
| 53 | 53 |
| 54 void updateCurrentTimeDisplay(); | 54 void updateCurrentTimeDisplay(); |
| 55 | 55 |
| 56 void changedClosedCaptionsVisibility(); | |
| 57 void refreshClosedCaptionsButtonVisibility(); | |
| 58 void toggleTextTrackList(); | 56 void toggleTextTrackList(); |
| 59 void showTextTrackAtIndex(unsigned indexToEnable); | 57 void showTextTrackAtIndex(unsigned indexToEnable); |
| 60 void disableShowingTextTracks(); | 58 void disableShowingTextTracks(); |
| 61 | 59 |
| 62 void enteredFullscreen(); | 60 void enteredFullscreen(); |
| 63 void exitedFullscreen(); | 61 void exitedFullscreen(); |
| 64 | 62 |
| 65 void startedCasting(); | 63 void startedCasting(); |
| 66 void stoppedCasting(); | 64 void stoppedCasting(); |
| 67 void refreshCastButtonVisibility(); | 65 void refreshCastButtonVisibility(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 88 // Notify us that our controls enclosure has changed width. | 86 // Notify us that our controls enclosure has changed width. |
| 89 void notifyPanelWidthChanged(const LayoutUnit& newWidth); | 87 void notifyPanelWidthChanged(const LayoutUnit& newWidth); |
| 90 | 88 |
| 91 // Notify us that the media element's network state has changed. | 89 // Notify us that the media element's network state has changed. |
| 92 void networkStateChanged(); | 90 void networkStateChanged(); |
| 93 | 91 |
| 94 void toggleOverflowMenu(); | 92 void toggleOverflowMenu(); |
| 95 | 93 |
| 96 bool overflowMenuVisible(); | 94 bool overflowMenuVisible(); |
| 97 | 95 |
| 96 // TODO(mlamouri): this is temporary to notify the controls that an |
| 97 // HTMLTrackElement failed to load because there is no web exposed way to |
| 98 // be notified on the TextTrack object. See https://crbug.com/669977 |
| 99 void onTrackElementFailedToLoad() { onTextTracksAddedOrRemoved(); } |
| 100 |
| 98 DECLARE_VIRTUAL_TRACE(); | 101 DECLARE_VIRTUAL_TRACE(); |
| 99 | 102 |
| 100 private: | 103 private: |
| 101 friend class MediaControlsMediaEventListener; | 104 friend class MediaControlsMediaEventListener; |
| 102 friend class MediaControlsTest; | 105 friend class MediaControlsTest; |
| 103 | 106 |
| 104 void invalidate(Element*); | 107 void invalidate(Element*); |
| 105 | 108 |
| 106 class BatchedControlUpdate; | 109 class BatchedControlUpdate; |
| 107 | 110 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 bool willRespondToMouseMoveEvents() override { return true; } | 144 bool willRespondToMouseMoveEvents() override { return true; } |
| 142 void defaultEventHandler(Event*) override; | 145 void defaultEventHandler(Event*) override; |
| 143 bool containsRelatedTarget(Event*); | 146 bool containsRelatedTarget(Event*); |
| 144 | 147 |
| 145 // Methods called by MediaControlsMediaEventListener. | 148 // Methods called by MediaControlsMediaEventListener. |
| 146 void onVolumeChange(); | 149 void onVolumeChange(); |
| 147 void onFocusIn(); | 150 void onFocusIn(); |
| 148 void onTimeUpdate(); | 151 void onTimeUpdate(); |
| 149 void onPlay(); | 152 void onPlay(); |
| 150 void onPause(); | 153 void onPause(); |
| 154 void onTextTracksAddedOrRemoved(); |
| 155 void onTextTracksChanged(); |
| 151 | 156 |
| 152 Member<HTMLMediaElement> m_mediaElement; | 157 Member<HTMLMediaElement> m_mediaElement; |
| 153 | 158 |
| 154 // Media control elements. | 159 // Media control elements. |
| 155 Member<MediaControlOverlayEnclosureElement> m_overlayEnclosure; | 160 Member<MediaControlOverlayEnclosureElement> m_overlayEnclosure; |
| 156 Member<MediaControlOverlayPlayButtonElement> m_overlayPlayButton; | 161 Member<MediaControlOverlayPlayButtonElement> m_overlayPlayButton; |
| 157 Member<MediaControlCastButtonElement> m_overlayCastButton; | 162 Member<MediaControlCastButtonElement> m_overlayCastButton; |
| 158 Member<MediaControlPanelEnclosureElement> m_enclosure; | 163 Member<MediaControlPanelEnclosureElement> m_enclosure; |
| 159 Member<MediaControlPanelElement> m_panel; | 164 Member<MediaControlPanelElement> m_panel; |
| 160 Member<MediaControlPlayButtonElement> m_playButton; | 165 Member<MediaControlPlayButtonElement> m_playButton; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 185 int m_panelWidth; | 190 int m_panelWidth; |
| 186 | 191 |
| 187 bool m_keepShowingUntilTimerFires : 1; | 192 bool m_keepShowingUntilTimerFires : 1; |
| 188 }; | 193 }; |
| 189 | 194 |
| 190 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 195 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
| 191 | 196 |
| 192 } // namespace blink | 197 } // namespace blink |
| 193 | 198 |
| 194 #endif | 199 #endif |
| OLD | NEW |