| 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 16 matching lines...) Expand all Loading... |
| 27 #ifndef MediaControls_h | 27 #ifndef MediaControls_h |
| 28 #define MediaControls_h | 28 #define MediaControls_h |
| 29 | 29 |
| 30 #include "core/html/HTMLDivElement.h" | 30 #include "core/html/HTMLDivElement.h" |
| 31 #include "core/html/shadow/MediaControlElements.h" | 31 #include "core/html/shadow/MediaControlElements.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class Event; | 35 class Event; |
| 36 class MediaControlsMediaEventListener; | 36 class MediaControlsMediaEventListener; |
| 37 class MediaControlsOrientationLockDelegate; |
| 37 class MediaControlsWindowEventListener; | 38 class MediaControlsWindowEventListener; |
| 38 | 39 |
| 39 class CORE_EXPORT MediaControls final : public HTMLDivElement { | 40 class CORE_EXPORT MediaControls final : public HTMLDivElement { |
| 40 public: | 41 public: |
| 41 static MediaControls* create(HTMLMediaElement&); | 42 static MediaControls* create(HTMLMediaElement&); |
| 42 | 43 |
| 43 HTMLMediaElement& mediaElement() const { return *m_mediaElement; } | 44 HTMLMediaElement& mediaElement() const { return *m_mediaElement; } |
| 44 | 45 |
| 45 void reset(); | 46 void reset(); |
| 46 | 47 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 100 |
| 100 // TODO(mlamouri): this is temporary to notify the controls that an | 101 // TODO(mlamouri): this is temporary to notify the controls that an |
| 101 // HTMLTrackElement failed to load because there is no web exposed way to | 102 // HTMLTrackElement failed to load because there is no web exposed way to |
| 102 // be notified on the TextTrack object. See https://crbug.com/669977 | 103 // be notified on the TextTrack object. See https://crbug.com/669977 |
| 103 void onTrackElementFailedToLoad() { onTextTracksAddedOrRemoved(); } | 104 void onTrackElementFailedToLoad() { onTextTracksAddedOrRemoved(); } |
| 104 | 105 |
| 105 DECLARE_VIRTUAL_TRACE(); | 106 DECLARE_VIRTUAL_TRACE(); |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 friend class MediaControlsMediaEventListener; | 109 friend class MediaControlsMediaEventListener; |
| 110 friend class MediaControlsOrientationLockDelegateTest; |
| 109 friend class MediaControlsTest; | 111 friend class MediaControlsTest; |
| 110 | 112 |
| 111 void invalidate(Element*); | 113 void invalidate(Element*); |
| 112 | 114 |
| 113 class BatchedControlUpdate; | 115 class BatchedControlUpdate; |
| 114 | 116 |
| 115 explicit MediaControls(HTMLMediaElement&); | 117 explicit MediaControls(HTMLMediaElement&); |
| 116 | 118 |
| 117 void initializeControls(); | 119 void initializeControls(); |
| 118 | 120 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 Member<MediaControlTextTrackListElement> m_textTrackList; | 179 Member<MediaControlTextTrackListElement> m_textTrackList; |
| 178 Member<MediaControlOverflowMenuButtonElement> m_overflowMenu; | 180 Member<MediaControlOverflowMenuButtonElement> m_overflowMenu; |
| 179 Member<MediaControlOverflowMenuListElement> m_overflowList; | 181 Member<MediaControlOverflowMenuListElement> m_overflowList; |
| 180 | 182 |
| 181 Member<MediaControlCastButtonElement> m_castButton; | 183 Member<MediaControlCastButtonElement> m_castButton; |
| 182 Member<MediaControlFullscreenButtonElement> m_fullscreenButton; | 184 Member<MediaControlFullscreenButtonElement> m_fullscreenButton; |
| 183 Member<MediaControlDownloadButtonElement> m_downloadButton; | 185 Member<MediaControlDownloadButtonElement> m_downloadButton; |
| 184 | 186 |
| 185 Member<MediaControlsMediaEventListener> m_mediaEventListener; | 187 Member<MediaControlsMediaEventListener> m_mediaEventListener; |
| 186 Member<MediaControlsWindowEventListener> m_windowEventListener; | 188 Member<MediaControlsWindowEventListener> m_windowEventListener; |
| 189 Member<MediaControlsOrientationLockDelegate> m_orientationLockDelegate; |
| 187 | 190 |
| 188 Timer<MediaControls> m_hideMediaControlsTimer; | 191 Timer<MediaControls> m_hideMediaControlsTimer; |
| 189 unsigned m_hideTimerBehaviorFlags; | 192 unsigned m_hideTimerBehaviorFlags; |
| 190 bool m_isMouseOverControls : 1; | 193 bool m_isMouseOverControls : 1; |
| 191 bool m_isPausedForScrubbing : 1; | 194 bool m_isPausedForScrubbing : 1; |
| 192 | 195 |
| 193 Timer<MediaControls> m_panelWidthChangedTimer; | 196 Timer<MediaControls> m_panelWidthChangedTimer; |
| 194 int m_panelWidth; | 197 int m_panelWidth; |
| 195 | 198 |
| 196 bool m_keepShowingUntilTimerFires : 1; | 199 bool m_keepShowingUntilTimerFires : 1; |
| 197 }; | 200 }; |
| 198 | 201 |
| 199 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 202 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
| 200 | 203 |
| 201 } // namespace blink | 204 } // namespace blink |
| 202 | 205 |
| 203 #endif | 206 #endif |
| OLD | NEW |