Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "core/html/shadow/MediaControlElements.h" | 30 #include "core/html/shadow/MediaControlElements.h" |
| 31 | 31 |
| 32 #include "bindings/core/v8/ExceptionState.h" | 32 #include "bindings/core/v8/ExceptionState.h" |
| 33 #include "core/InputTypeNames.h" | 33 #include "core/InputTypeNames.h" |
| 34 #include "core/dom/ClientRect.h" | 34 #include "core/dom/ClientRect.h" |
| 35 #include "core/dom/TaskRunnerHelper.h" | |
| 35 #include "core/dom/Text.h" | 36 #include "core/dom/Text.h" |
| 36 #include "core/dom/shadow/ShadowRoot.h" | 37 #include "core/dom/shadow/ShadowRoot.h" |
| 37 #include "core/events/MouseEvent.h" | 38 #include "core/events/MouseEvent.h" |
| 38 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
| 39 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 40 #include "core/html/HTMLAnchorElement.h" | 41 #include "core/html/HTMLAnchorElement.h" |
| 41 #include "core/html/HTMLLabelElement.h" | 42 #include "core/html/HTMLLabelElement.h" |
| 42 #include "core/html/HTMLMediaSource.h" | 43 #include "core/html/HTMLMediaSource.h" |
| 43 #include "core/html/HTMLSpanElement.h" | 44 #include "core/html/HTMLSpanElement.h" |
| 44 #include "core/html/HTMLVideoElement.h" | 45 #include "core/html/HTMLVideoElement.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 } | 124 } |
| 124 return false; | 125 return false; |
| 125 } | 126 } |
| 126 | 127 |
| 127 } // anonymous namespace | 128 } // anonymous namespace |
| 128 | 129 |
| 129 MediaControlPanelElement::MediaControlPanelElement(MediaControls& mediaControls) | 130 MediaControlPanelElement::MediaControlPanelElement(MediaControls& mediaControls) |
| 130 : MediaControlDivElement(mediaControls, MediaControlsPanel), | 131 : MediaControlDivElement(mediaControls, MediaControlsPanel), |
| 131 m_isDisplayed(false), | 132 m_isDisplayed(false), |
| 132 m_opaque(true), | 133 m_opaque(true), |
| 133 m_transitionTimer(this, &MediaControlPanelElement::transitionTimerFired) { | 134 m_transitionTimer(TaskRunnerHelper::get(TaskType::MediaElementEvent, |
|
mlamouri (slow - plz ping)
2017/01/23 00:00:39
Ideally, MediaControlElements shouldn't be noticea
| |
| 134 } | 135 &mediaControls.document()), |
| 136 this, | |
| 137 &MediaControlPanelElement::transitionTimerFired) {} | |
| 135 | 138 |
| 136 MediaControlPanelElement* MediaControlPanelElement::create( | 139 MediaControlPanelElement* MediaControlPanelElement::create( |
| 137 MediaControls& mediaControls) { | 140 MediaControls& mediaControls) { |
| 138 MediaControlPanelElement* panel = new MediaControlPanelElement(mediaControls); | 141 MediaControlPanelElement* panel = new MediaControlPanelElement(mediaControls); |
| 139 panel->setShadowPseudoId(AtomicString("-webkit-media-controls-panel")); | 142 panel->setShadowPseudoId(AtomicString("-webkit-media-controls-panel")); |
| 140 return panel; | 143 return panel; |
| 141 } | 144 } |
| 142 | 145 |
| 143 void MediaControlPanelElement::defaultEventHandler(Event* event) { | 146 void MediaControlPanelElement::defaultEventHandler(Event* event) { |
| 144 // Suppress the media element activation behavior (toggle play/pause) when | 147 // Suppress the media element activation behavior (toggle play/pause) when |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1045 MediaControlCurrentTimeDisplayElement* | 1048 MediaControlCurrentTimeDisplayElement* |
| 1046 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { | 1049 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { |
| 1047 MediaControlCurrentTimeDisplayElement* element = | 1050 MediaControlCurrentTimeDisplayElement* element = |
| 1048 new MediaControlCurrentTimeDisplayElement(mediaControls); | 1051 new MediaControlCurrentTimeDisplayElement(mediaControls); |
| 1049 element->setShadowPseudoId( | 1052 element->setShadowPseudoId( |
| 1050 AtomicString("-webkit-media-controls-current-time-display")); | 1053 AtomicString("-webkit-media-controls-current-time-display")); |
| 1051 return element; | 1054 return element; |
| 1052 } | 1055 } |
| 1053 | 1056 |
| 1054 } // namespace blink | 1057 } // namespace blink |
| OLD | NEW |