| 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 "config.h" | 27 #include "config.h" |
| 28 #include "core/html/shadow/MediaControls.h" | 28 #include "core/html/shadow/MediaControls.h" |
| 29 | 29 |
| 30 #include "bindings/v8/ExceptionStatePlaceholder.h" | 30 #include "bindings/v8/ExceptionStatePlaceholder.h" |
| 31 #include "core/events/MouseEvent.h" | 31 #include "core/events/MouseEvent.h" |
| 32 #include "core/frame/Settings.h" | |
| 33 #include "core/html/HTMLMediaElement.h" | 32 #include "core/html/HTMLMediaElement.h" |
| 34 #include "core/html/MediaController.h" | 33 #include "core/html/MediaController.h" |
| 35 #include "core/rendering/RenderTheme.h" | 34 #include "core/rendering/RenderTheme.h" |
| 36 | 35 |
| 37 namespace WebCore { | 36 namespace WebCore { |
| 38 | 37 |
| 39 #if OS(ANDROID) | 38 #if OS(ANDROID) |
| 40 static const bool alwaysHideFullscreenControls = true; | 39 static const bool alwaysHideFullscreenControls = true; |
| 41 static const bool needOverlayPlayButton = true; | 40 static const bool needOverlayPlayButton = true; |
| 42 #else | 41 #else |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 185 |
| 187 if (!mediaControllerInterface().hasAudio()) { | 186 if (!mediaControllerInterface().hasAudio()) { |
| 188 m_volumeSlider->hide(); | 187 m_volumeSlider->hide(); |
| 189 } else { | 188 } else { |
| 190 m_volumeSlider->show(); | 189 m_volumeSlider->show(); |
| 191 m_volumeSlider->setVolume(mediaControllerInterface().volume()); | 190 m_volumeSlider->setVolume(mediaControllerInterface().volume()); |
| 192 } | 191 } |
| 193 | 192 |
| 194 refreshClosedCaptionsButtonVisibility(); | 193 refreshClosedCaptionsButtonVisibility(); |
| 195 | 194 |
| 196 if (mediaElement().hasVideo() && document().settings() && document().setting
s()->fullScreenEnabled()) | 195 if (mediaElement().hasVideo()) |
| 197 m_fullScreenButton->show(); | 196 m_fullScreenButton->show(); |
| 198 else | 197 else |
| 199 m_fullScreenButton->hide(); | 198 m_fullScreenButton->hide(); |
| 200 | 199 |
| 201 makeOpaque(); | 200 makeOpaque(); |
| 202 } | 201 } |
| 203 | 202 |
| 204 void MediaControls::show() | 203 void MediaControls::show() |
| 205 { | 204 { |
| 206 makeOpaque(); | 205 makeOpaque(); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 | 462 |
| 464 void MediaControls::updateTextTrackDisplay() | 463 void MediaControls::updateTextTrackDisplay() |
| 465 { | 464 { |
| 466 if (!m_textDisplayContainer) | 465 if (!m_textDisplayContainer) |
| 467 createTextTrackDisplay(); | 466 createTextTrackDisplay(); |
| 468 | 467 |
| 469 m_textDisplayContainer->updateDisplay(); | 468 m_textDisplayContainer->updateDisplay(); |
| 470 } | 469 } |
| 471 | 470 |
| 472 } | 471 } |
| OLD | NEW |