| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * 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 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2680 // cancelable, and that uses the TrackEvent interface, with the track | 2680 // cancelable, and that uses the TrackEvent interface, with the track |
| 2681 // attribute initialized to the text track's TextTrack object, at the media | 2681 // attribute initialized to the text track's TextTrack object, at the media |
| 2682 // element's textTracks attribute's TextTrackList object. | 2682 // element's textTracks attribute's TextTrackList object. |
| 2683 textTracks()->append(textTrack); | 2683 textTracks()->append(textTrack); |
| 2684 } | 2684 } |
| 2685 | 2685 |
| 2686 void HTMLMediaElement::removeTextTrack(WebInbandTextTrack* webTrack) { | 2686 void HTMLMediaElement::removeTextTrack(WebInbandTextTrack* webTrack) { |
| 2687 if (!m_textTracks) | 2687 if (!m_textTracks) |
| 2688 return; | 2688 return; |
| 2689 | 2689 |
| 2690 // This cast is safe because we created the InbandTextTrack with the | 2690 // This cast is safe because InbandTextTrack is the only concrete |
| 2691 // WebInbandTextTrack passed to mediaPlayerDidAddTextTrack. | 2691 // implementation of WebInbandTextTrackClient. |
| 2692 InbandTextTrack* textTrack = | 2692 InbandTextTrack* textTrack = toInbandTextTrack(webTrack->client()); |
| 2693 static_cast<InbandTextTrack*>(webTrack->client()); | |
| 2694 if (!textTrack) | 2693 if (!textTrack) |
| 2695 return; | 2694 return; |
| 2696 | 2695 |
| 2697 m_textTracks->remove(textTrack); | 2696 m_textTracks->remove(textTrack); |
| 2698 } | 2697 } |
| 2699 | 2698 |
| 2700 void HTMLMediaElement::forgetResourceSpecificTracks() { | 2699 void HTMLMediaElement::forgetResourceSpecificTracks() { |
| 2701 // Implements the "forget the media element's media-resource-specific tracks" | 2700 // Implements the "forget the media element's media-resource-specific tracks" |
| 2702 // algorithm. The order is explicitly specified as text, then audio, and | 2701 // algorithm. The order is explicitly specified as text, then audio, and |
| 2703 // finally video. Also 'removetrack' events should not be fired. | 2702 // finally video. Also 'removetrack' events should not be fired. |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4131 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4130 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
| 4132 } | 4131 } |
| 4133 | 4132 |
| 4134 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4133 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
| 4135 m_mostlyFillingViewport = true; | 4134 m_mostlyFillingViewport = true; |
| 4136 if (m_webMediaPlayer) | 4135 if (m_webMediaPlayer) |
| 4137 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4136 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
| 4138 } | 4137 } |
| 4139 | 4138 |
| 4140 } // namespace blink | 4139 } // namespace blink |
| OLD | NEW |