| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 { | 77 { |
| 78 #if ENABLE(OILPAN) | 78 #if ENABLE(OILPAN) |
| 79 if (m_webTrack) | 79 if (m_webTrack) |
| 80 m_webTrack->setClient(0); | 80 m_webTrack->setClient(0); |
| 81 #else | 81 #else |
| 82 // Make sure m_webTrack was cleared by trackRemoved() before destruction. | 82 // Make sure m_webTrack was cleared by trackRemoved() before destruction. |
| 83 ASSERT(!m_webTrack); | 83 ASSERT(!m_webTrack); |
| 84 #endif | 84 #endif |
| 85 } | 85 } |
| 86 | 86 |
| 87 size_t InbandTextTrack::inbandTrackIndex() | |
| 88 { | |
| 89 ASSERT(m_webTrack); | |
| 90 return m_webTrack->textTrackIndex(); | |
| 91 } | |
| 92 | |
| 93 void InbandTextTrack::setTrackList(TextTrackList* trackList) | 87 void InbandTextTrack::setTrackList(TextTrackList* trackList) |
| 94 { | 88 { |
| 95 TextTrack::setTrackList(trackList); | 89 TextTrack::setTrackList(trackList); |
| 96 if (trackList) | 90 if (trackList) |
| 97 return; | 91 return; |
| 98 | 92 |
| 99 ASSERT(m_webTrack); | 93 ASSERT(m_webTrack); |
| 100 m_webTrack->setClient(0); | 94 m_webTrack->setClient(0); |
| 101 m_webTrack = 0; | 95 m_webTrack = 0; |
| 102 } | 96 } |
| 103 | 97 |
| 104 void InbandTextTrack::addWebVTTCue(double start, double end, const WebString& id
, const WebString& content, const WebString& settings) | 98 void InbandTextTrack::addWebVTTCue(double start, double end, const WebString& id
, const WebString& content, const WebString& settings) |
| 105 { | 99 { |
| 106 HTMLMediaElement* owner = mediaElement(); | 100 HTMLMediaElement* owner = mediaElement(); |
| 107 ASSERT(owner); | 101 ASSERT(owner); |
| 108 RefPtrWillBeRawPtr<VTTCue> cue = VTTCue::create(owner->document(), start, en
d, content); | 102 RefPtrWillBeRawPtr<VTTCue> cue = VTTCue::create(owner->document(), start, en
d, content); |
| 109 cue->setId(id); | 103 cue->setId(id); |
| 110 cue->parseSettings(settings); | 104 cue->parseSettings(settings); |
| 111 addCue(cue); | 105 addCue(cue); |
| 112 } | 106 } |
| 113 | 107 |
| 114 } // namespace blink | 108 } // namespace blink |
| OLD | NEW |