| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 128 } |
| 128 return false; | 129 return false; |
| 129 } | 130 } |
| 130 | 131 |
| 131 } // anonymous namespace | 132 } // anonymous namespace |
| 132 | 133 |
| 133 MediaControlPanelElement::MediaControlPanelElement(MediaControls& mediaControls) | 134 MediaControlPanelElement::MediaControlPanelElement(MediaControls& mediaControls) |
| 134 : MediaControlDivElement(mediaControls, MediaControlsPanel), | 135 : MediaControlDivElement(mediaControls, MediaControlsPanel), |
| 135 m_isDisplayed(false), | 136 m_isDisplayed(false), |
| 136 m_opaque(true), | 137 m_opaque(true), |
| 137 m_transitionTimer(this, &MediaControlPanelElement::transitionTimerFired) { | 138 m_transitionTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, |
| 138 } | 139 &mediaControls.document()), |
| 140 this, |
| 141 &MediaControlPanelElement::transitionTimerFired) {} |
| 139 | 142 |
| 140 MediaControlPanelElement* MediaControlPanelElement::create( | 143 MediaControlPanelElement* MediaControlPanelElement::create( |
| 141 MediaControls& mediaControls) { | 144 MediaControls& mediaControls) { |
| 142 MediaControlPanelElement* panel = new MediaControlPanelElement(mediaControls); | 145 MediaControlPanelElement* panel = new MediaControlPanelElement(mediaControls); |
| 143 panel->setShadowPseudoId(AtomicString("-webkit-media-controls-panel")); | 146 panel->setShadowPseudoId(AtomicString("-webkit-media-controls-panel")); |
| 144 return panel; | 147 return panel; |
| 145 } | 148 } |
| 146 | 149 |
| 147 void MediaControlPanelElement::defaultEventHandler(Event* event) { | 150 void MediaControlPanelElement::defaultEventHandler(Event* event) { |
| 148 // Suppress the media element activation behavior (toggle play/pause) when | 151 // Suppress the media element activation behavior (toggle play/pause) when |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 MediaControlCurrentTimeDisplayElement* | 1041 MediaControlCurrentTimeDisplayElement* |
| 1039 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { | 1042 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { |
| 1040 MediaControlCurrentTimeDisplayElement* element = | 1043 MediaControlCurrentTimeDisplayElement* element = |
| 1041 new MediaControlCurrentTimeDisplayElement(mediaControls); | 1044 new MediaControlCurrentTimeDisplayElement(mediaControls); |
| 1042 element->setShadowPseudoId( | 1045 element->setShadowPseudoId( |
| 1043 AtomicString("-webkit-media-controls-current-time-display")); | 1046 AtomicString("-webkit-media-controls-current-time-display")); |
| 1044 return element; | 1047 return element; |
| 1045 } | 1048 } |
| 1046 | 1049 |
| 1047 } // namespace blink | 1050 } // namespace blink |
| OLD | NEW |