OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "core/html/MediaController.h" | 48 #include "core/html/MediaController.h" |
49 #include "core/html/MediaError.h" | 49 #include "core/html/MediaError.h" |
50 #include "core/html/MediaFragmentURIParser.h" | 50 #include "core/html/MediaFragmentURIParser.h" |
51 #include "core/html/TimeRanges.h" | 51 #include "core/html/TimeRanges.h" |
52 #include "core/html/shadow/MediaControls.h" | 52 #include "core/html/shadow/MediaControls.h" |
53 #include "core/html/track/AudioTrack.h" | 53 #include "core/html/track/AudioTrack.h" |
54 #include "core/html/track/AudioTrackList.h" | 54 #include "core/html/track/AudioTrackList.h" |
55 #include "core/html/track/AutomaticTrackSelection.h" | 55 #include "core/html/track/AutomaticTrackSelection.h" |
56 #include "core/html/track/CueTimeline.h" | 56 #include "core/html/track/CueTimeline.h" |
57 #include "core/html/track/InbandTextTrack.h" | 57 #include "core/html/track/InbandTextTrack.h" |
| 58 #include "core/html/track/TextTrackContainer.h" |
58 #include "core/html/track/TextTrackList.h" | 59 #include "core/html/track/TextTrackList.h" |
59 #include "core/html/track/VideoTrack.h" | 60 #include "core/html/track/VideoTrack.h" |
60 #include "core/html/track/VideoTrackList.h" | 61 #include "core/html/track/VideoTrackList.h" |
61 #include "core/layout/LayoutVideo.h" | 62 #include "core/layout/LayoutVideo.h" |
62 #include "core/layout/LayoutView.h" | 63 #include "core/layout/LayoutView.h" |
63 #include "core/layout/compositing/LayerCompositor.h" | 64 #include "core/layout/compositing/LayerCompositor.h" |
64 #include "core/loader/FrameLoader.h" | 65 #include "core/loader/FrameLoader.h" |
65 #include "platform/ContentType.h" | 66 #include "platform/ContentType.h" |
66 #include "platform/Logging.h" | 67 #include "platform/Logging.h" |
67 #include "platform/MIMETypeFromURL.h" | 68 #include "platform/MIMETypeFromURL.h" |
(...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3176 } | 3177 } |
3177 } | 3178 } |
3178 return false; | 3179 return false; |
3179 } | 3180 } |
3180 | 3181 |
3181 bool HTMLMediaElement::closedCaptionsVisible() const | 3182 bool HTMLMediaElement::closedCaptionsVisible() const |
3182 { | 3183 { |
3183 return m_closedCaptionsVisible; | 3184 return m_closedCaptionsVisible; |
3184 } | 3185 } |
3185 | 3186 |
| 3187 TextTrackContainer& HTMLMediaElement::ensureTextTrackContainer() |
| 3188 { |
| 3189 ensureMediaControls(); |
| 3190 return *mediaControls()->textTrackContainer(); |
| 3191 } |
| 3192 |
3186 void HTMLMediaElement::updateTextTrackDisplay() | 3193 void HTMLMediaElement::updateTextTrackDisplay() |
3187 { | 3194 { |
3188 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this); | 3195 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this); |
3189 | 3196 |
3190 ensureMediaControls(); | 3197 ensureTextTrackContainer().updateDisplay(*this); |
3191 mediaControls()->updateTextTrackDisplay(); | |
3192 } | 3198 } |
3193 | 3199 |
3194 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) | 3200 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) |
3195 { | 3201 { |
3196 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%p, %s)", this, b
oolString(closedCaptionVisible)); | 3202 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%p, %s)", this, b
oolString(closedCaptionVisible)); |
3197 | 3203 |
3198 if (!m_player || !hasClosedCaptions()) | 3204 if (!m_player || !hasClosedCaptions()) |
3199 return; | 3205 return; |
3200 | 3206 |
3201 m_closedCaptionsVisible = closedCaptionVisible; | 3207 m_closedCaptionsVisible = closedCaptionVisible; |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3595 | 3601 |
3596 #if ENABLE(WEB_AUDIO) | 3602 #if ENABLE(WEB_AUDIO) |
3597 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3603 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
3598 { | 3604 { |
3599 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 3605 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
3600 audioSourceProvider()->setClient(nullptr); | 3606 audioSourceProvider()->setClient(nullptr); |
3601 } | 3607 } |
3602 #endif | 3608 #endif |
3603 | 3609 |
3604 } | 3610 } |
OLD | NEW |