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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 if (m_textDisplayContainer) | 521 if (m_textDisplayContainer) |
522 return; | 522 return; |
523 | 523 |
524 RefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> textDisplayContain
er = MediaControlTextTrackContainerElement::create(*this); | 524 RefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> textDisplayContain
er = MediaControlTextTrackContainerElement::create(*this); |
525 m_textDisplayContainer = textDisplayContainer.get(); | 525 m_textDisplayContainer = textDisplayContainer.get(); |
526 | 526 |
527 // Insert it before (behind) all other control elements. | 527 // Insert it before (behind) all other control elements. |
528 m_overlayEnclosure->insertBefore(textDisplayContainer.release(), m_overlayEn
closure->firstChild()); | 528 m_overlayEnclosure->insertBefore(textDisplayContainer.release(), m_overlayEn
closure->firstChild()); |
529 } | 529 } |
530 | 530 |
531 void MediaControls::showTextTrackDisplay() | |
532 { | |
533 if (!m_textDisplayContainer) | |
534 createTextTrackDisplay(); | |
535 m_textDisplayContainer->show(); | |
536 } | |
537 | |
538 void MediaControls::hideTextTrackDisplay() | |
539 { | |
540 if (!m_textDisplayContainer) | |
541 createTextTrackDisplay(); | |
542 m_textDisplayContainer->hide(); | |
543 } | |
544 | |
545 void MediaControls::updateTextTrackDisplay() | 531 void MediaControls::updateTextTrackDisplay() |
546 { | 532 { |
547 if (!m_textDisplayContainer) | 533 if (!m_textDisplayContainer) |
548 createTextTrackDisplay(); | 534 createTextTrackDisplay(); |
549 | 535 |
550 m_textDisplayContainer->updateDisplay(); | 536 m_textDisplayContainer->updateDisplay(); |
551 } | 537 } |
552 | 538 |
553 DEFINE_TRACE(MediaControls) | 539 DEFINE_TRACE(MediaControls) |
554 { | 540 { |
(...skipping 10 matching lines...) Expand all Loading... |
565 visitor->trace(m_toggleClosedCaptionsButton); | 551 visitor->trace(m_toggleClosedCaptionsButton); |
566 visitor->trace(m_fullScreenButton); | 552 visitor->trace(m_fullScreenButton); |
567 visitor->trace(m_durationDisplay); | 553 visitor->trace(m_durationDisplay); |
568 visitor->trace(m_enclosure); | 554 visitor->trace(m_enclosure); |
569 visitor->trace(m_castButton); | 555 visitor->trace(m_castButton); |
570 visitor->trace(m_overlayCastButton); | 556 visitor->trace(m_overlayCastButton); |
571 HTMLDivElement::trace(visitor); | 557 HTMLDivElement::trace(visitor); |
572 } | 558 } |
573 | 559 |
574 } | 560 } |
OLD | NEW |