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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 } | 457 } |
458 } | 458 } |
459 | 459 |
460 void MediaControls::updateCurrentTimeDisplay() { | 460 void MediaControls::updateCurrentTimeDisplay() { |
461 double now = mediaElement().currentTime(); | 461 double now = mediaElement().currentTime(); |
462 double duration = mediaElement().duration(); | 462 double duration = mediaElement().duration(); |
463 | 463 |
464 // Allow the theme to format the time. | 464 // Allow the theme to format the time. |
465 m_currentTimeDisplay->setInnerText( | 465 m_currentTimeDisplay->setInnerText( |
466 LayoutTheme::theme().formatMediaControlsCurrentTime(now, duration), | 466 LayoutTheme::theme().formatMediaControlsCurrentTime(now, duration), |
467 IGNORE_EXCEPTION); | 467 IGNORE_EXCEPTION_FOR_TESTING); |
468 m_currentTimeDisplay->setCurrentValue(now); | 468 m_currentTimeDisplay->setCurrentValue(now); |
469 } | 469 } |
470 | 470 |
471 void MediaControls::toggleTextTrackList() { | 471 void MediaControls::toggleTextTrackList() { |
472 if (!mediaElement().hasClosedCaptions()) { | 472 if (!mediaElement().hasClosedCaptions()) { |
473 m_textTrackList->setVisible(false); | 473 m_textTrackList->setVisible(false); |
474 return; | 474 return; |
475 } | 475 } |
476 | 476 |
477 if (!m_textTrackList->isWanted()) | 477 if (!m_textTrackList->isWanted()) |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 visitor->trace(m_overflowList); | 954 visitor->trace(m_overflowList); |
955 visitor->trace(m_castButton); | 955 visitor->trace(m_castButton); |
956 visitor->trace(m_overlayCastButton); | 956 visitor->trace(m_overlayCastButton); |
957 visitor->trace(m_mediaEventListener); | 957 visitor->trace(m_mediaEventListener); |
958 visitor->trace(m_windowEventListener); | 958 visitor->trace(m_windowEventListener); |
959 visitor->trace(m_orientationLockDelegate); | 959 visitor->trace(m_orientationLockDelegate); |
960 HTMLDivElement::trace(visitor); | 960 HTMLDivElement::trace(visitor); |
961 } | 961 } |
962 | 962 |
963 } // namespace blink | 963 } // namespace blink |
OLD | NEW |