| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void showTextTrackAtIndex(unsigned indexToEnable); | 58 void showTextTrackAtIndex(unsigned indexToEnable); |
| 59 void disableShowingTextTracks(); | 59 void disableShowingTextTracks(); |
| 60 | 60 |
| 61 // Called by the fullscreen buttons to toggle fulllscreen on/off. | 61 // Called by the fullscreen buttons to toggle fulllscreen on/off. |
| 62 void enterFullscreen(); | 62 void enterFullscreen(); |
| 63 void exitFullscreen(); | 63 void exitFullscreen(); |
| 64 | 64 |
| 65 void enteredFullscreen(); | 65 void enteredFullscreen(); |
| 66 void exitedFullscreen(); | 66 void exitedFullscreen(); |
| 67 | 67 |
| 68 void startedCasting(); | |
| 69 void stoppedCasting(); | |
| 70 void refreshCastButtonVisibility(); | |
| 71 void showOverlayCastButtonIfNeeded(); | 68 void showOverlayCastButtonIfNeeded(); |
| 72 // Update cast button visibility, but don't try to update our panel | 69 // Update cast button visibility, but don't try to update our panel |
| 73 // button visibility for space. | 70 // button visibility for space. |
| 74 void refreshCastButtonVisibilityWithoutUpdate(); | 71 void refreshCastButtonVisibilityWithoutUpdate(); |
| 75 | 72 |
| 76 void setAllowHiddenVolumeControls(bool); | 73 void setAllowHiddenVolumeControls(bool); |
| 77 | 74 |
| 78 // Returns the layout object for the part of the controls that should be | 75 // Returns the layout object for the part of the controls that should be |
| 79 // used for overlap checking during text track layout. May be null. | 76 // used for overlap checking during text track layout. May be null. |
| 80 LayoutObject* layoutObjectForTextTrackLayout(); | 77 LayoutObject* layoutObjectForTextTrackLayout(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 96 | 93 |
| 97 void toggleOverflowMenu(); | 94 void toggleOverflowMenu(); |
| 98 | 95 |
| 99 bool overflowMenuVisible(); | 96 bool overflowMenuVisible(); |
| 100 | 97 |
| 101 // TODO(mlamouri): this is temporary to notify the controls that an | 98 // TODO(mlamouri): this is temporary to notify the controls that an |
| 102 // HTMLTrackElement failed to load because there is no web exposed way to | 99 // HTMLTrackElement failed to load because there is no web exposed way to |
| 103 // be notified on the TextTrack object. See https://crbug.com/669977 | 100 // be notified on the TextTrack object. See https://crbug.com/669977 |
| 104 void onTrackElementFailedToLoad() { onTextTracksAddedOrRemoved(); } | 101 void onTrackElementFailedToLoad() { onTextTracksAddedOrRemoved(); } |
| 105 | 102 |
| 103 // TODO(mlamouri): the following methods will be able to become private when |
| 104 // the controls have moved to modules/ and have access to RemotePlayback. |
| 105 void onRemotePlaybackAvailabilityChanged() { refreshCastButtonVisibility(); } |
| 106 void onRemotePlaybackConnecting() { startedCasting(); } |
| 107 void onRemotePlaybackDisconnected() { stoppedCasting(); } |
| 108 |
| 109 // TODO(mlamouri): this method is needed in order to notify the controls that |
| 110 // the attribute have changed. |
| 111 void onDisableRemotePlaybackAttributeChanged() { |
| 112 refreshCastButtonVisibility(); |
| 113 } |
| 114 |
| 106 DECLARE_VIRTUAL_TRACE(); | 115 DECLARE_VIRTUAL_TRACE(); |
| 107 | 116 |
| 108 private: | 117 private: |
| 109 friend class MediaControlsMediaEventListener; | 118 friend class MediaControlsMediaEventListener; |
| 110 friend class MediaControlsOrientationLockDelegateTest; | 119 friend class MediaControlsOrientationLockDelegateTest; |
| 111 friend class MediaControlsTest; | 120 friend class MediaControlsTest; |
| 112 | 121 |
| 113 void invalidate(Element*); | 122 void invalidate(Element*); |
| 114 | 123 |
| 115 class BatchedControlUpdate; | 124 class BatchedControlUpdate; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void onFocusIn(); | 165 void onFocusIn(); |
| 157 void onTimeUpdate(); | 166 void onTimeUpdate(); |
| 158 void onDurationChange(); | 167 void onDurationChange(); |
| 159 void onPlay(); | 168 void onPlay(); |
| 160 void onPause(); | 169 void onPause(); |
| 161 void onTextTracksAddedOrRemoved(); | 170 void onTextTracksAddedOrRemoved(); |
| 162 void onTextTracksChanged(); | 171 void onTextTracksChanged(); |
| 163 void onError(); | 172 void onError(); |
| 164 void onLoadedMetadata(); | 173 void onLoadedMetadata(); |
| 165 | 174 |
| 175 // Internal cast related methods. |
| 176 void startedCasting(); |
| 177 void stoppedCasting(); |
| 178 void refreshCastButtonVisibility(); |
| 179 |
| 166 Member<HTMLMediaElement> m_mediaElement; | 180 Member<HTMLMediaElement> m_mediaElement; |
| 167 | 181 |
| 168 // Media control elements. | 182 // Media control elements. |
| 169 Member<MediaControlOverlayEnclosureElement> m_overlayEnclosure; | 183 Member<MediaControlOverlayEnclosureElement> m_overlayEnclosure; |
| 170 Member<MediaControlOverlayPlayButtonElement> m_overlayPlayButton; | 184 Member<MediaControlOverlayPlayButtonElement> m_overlayPlayButton; |
| 171 Member<MediaControlCastButtonElement> m_overlayCastButton; | 185 Member<MediaControlCastButtonElement> m_overlayCastButton; |
| 172 Member<MediaControlPanelEnclosureElement> m_enclosure; | 186 Member<MediaControlPanelEnclosureElement> m_enclosure; |
| 173 Member<MediaControlPanelElement> m_panel; | 187 Member<MediaControlPanelElement> m_panel; |
| 174 Member<MediaControlPlayButtonElement> m_playButton; | 188 Member<MediaControlPlayButtonElement> m_playButton; |
| 175 Member<MediaControlTimelineElement> m_timeline; | 189 Member<MediaControlTimelineElement> m_timeline; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 200 int m_panelWidth; | 214 int m_panelWidth; |
| 201 | 215 |
| 202 bool m_keepShowingUntilTimerFires : 1; | 216 bool m_keepShowingUntilTimerFires : 1; |
| 203 }; | 217 }; |
| 204 | 218 |
| 205 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 219 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
| 206 | 220 |
| 207 } // namespace blink | 221 } // namespace blink |
| 208 | 222 |
| 209 #endif | 223 #endif |
| OLD | NEW |