| 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 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/html/shadow/MediaControls.h" | 27 #include "core/html/shadow/MediaControls.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 30 #include "core/dom/ClientRect.h" | 30 #include "core/dom/ClientRect.h" |
| 31 #include "core/dom/Fullscreen.h" | 31 #include "core/dom/Fullscreen.h" |
| 32 #include "core/dom/TaskRunnerHelper.h" |
| 32 #include "core/events/MouseEvent.h" | 33 #include "core/events/MouseEvent.h" |
| 33 #include "core/frame/Settings.h" | 34 #include "core/frame/Settings.h" |
| 34 #include "core/html/HTMLMediaElement.h" | 35 #include "core/html/HTMLMediaElement.h" |
| 35 #include "core/html/HTMLVideoElement.h" | 36 #include "core/html/HTMLVideoElement.h" |
| 36 #include "core/html/shadow/MediaControlsMediaEventListener.h" | 37 #include "core/html/shadow/MediaControlsMediaEventListener.h" |
| 37 #include "core/html/shadow/MediaControlsOrientationLockDelegate.h" | 38 #include "core/html/shadow/MediaControlsOrientationLockDelegate.h" |
| 38 #include "core/html/shadow/MediaControlsWindowEventListener.h" | 39 #include "core/html/shadow/MediaControlsWindowEventListener.h" |
| 39 #include "core/html/track/TextTrackContainer.h" | 40 #include "core/html/track/TextTrackContainer.h" |
| 40 #include "core/html/track/TextTrackList.h" | 41 #include "core/html/track/TextTrackList.h" |
| 41 #include "core/layout/LayoutObject.h" | 42 #include "core/layout/LayoutObject.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 m_textTrackList(nullptr), | 124 m_textTrackList(nullptr), |
| 124 m_overflowList(nullptr), | 125 m_overflowList(nullptr), |
| 125 m_castButton(nullptr), | 126 m_castButton(nullptr), |
| 126 m_fullscreenButton(nullptr), | 127 m_fullscreenButton(nullptr), |
| 127 m_downloadButton(nullptr), | 128 m_downloadButton(nullptr), |
| 128 m_mediaEventListener(new MediaControlsMediaEventListener(this)), | 129 m_mediaEventListener(new MediaControlsMediaEventListener(this)), |
| 129 m_windowEventListener(MediaControlsWindowEventListener::create( | 130 m_windowEventListener(MediaControlsWindowEventListener::create( |
| 130 this, | 131 this, |
| 131 WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))), | 132 WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))), |
| 132 m_orientationLockDelegate(nullptr), | 133 m_orientationLockDelegate(nullptr), |
| 133 m_hideMediaControlsTimer(this, | 134 m_hideMediaControlsTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, |
| 135 &mediaElement.document()), |
| 136 this, |
| 134 &MediaControls::hideMediaControlsTimerFired), | 137 &MediaControls::hideMediaControlsTimerFired), |
| 135 m_hideTimerBehaviorFlags(IgnoreNone), | 138 m_hideTimerBehaviorFlags(IgnoreNone), |
| 136 m_isMouseOverControls(false), | 139 m_isMouseOverControls(false), |
| 137 m_isPausedForScrubbing(false), | 140 m_isPausedForScrubbing(false), |
| 138 m_panelWidthChangedTimer(this, | 141 m_panelWidthChangedTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, |
| 142 &mediaElement.document()), |
| 143 this, |
| 139 &MediaControls::panelWidthChangedTimerFired), | 144 &MediaControls::panelWidthChangedTimerFired), |
| 140 m_panelWidth(0), | 145 m_panelWidth(0), |
| 141 m_keepShowingUntilTimerFires(false) {} | 146 m_keepShowingUntilTimerFires(false) {} |
| 142 | 147 |
| 143 MediaControls* MediaControls::create(HTMLMediaElement& mediaElement, | 148 MediaControls* MediaControls::create(HTMLMediaElement& mediaElement, |
| 144 ShadowRoot& shadowRoot) { | 149 ShadowRoot& shadowRoot) { |
| 145 MediaControls* controls = new MediaControls(mediaElement); | 150 MediaControls* controls = new MediaControls(mediaElement); |
| 146 controls->setShadowPseudoId(AtomicString("-webkit-media-controls")); | 151 controls->setShadowPseudoId(AtomicString("-webkit-media-controls")); |
| 147 controls->initializeControls(); | 152 controls->initializeControls(); |
| 148 controls->reset(); | 153 controls->reset(); |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 visitor->trace(m_overflowList); | 967 visitor->trace(m_overflowList); |
| 963 visitor->trace(m_castButton); | 968 visitor->trace(m_castButton); |
| 964 visitor->trace(m_overlayCastButton); | 969 visitor->trace(m_overlayCastButton); |
| 965 visitor->trace(m_mediaEventListener); | 970 visitor->trace(m_mediaEventListener); |
| 966 visitor->trace(m_windowEventListener); | 971 visitor->trace(m_windowEventListener); |
| 967 visitor->trace(m_orientationLockDelegate); | 972 visitor->trace(m_orientationLockDelegate); |
| 968 HTMLDivElement::trace(visitor); | 973 HTMLDivElement::trace(visitor); |
| 969 } | 974 } |
| 970 | 975 |
| 971 } // namespace blink | 976 } // namespace blink |
| OLD | NEW |