OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/html/track/VideoTrackList.h" | 5 #include "core/html/track/VideoTrackList.h" |
6 | 6 |
7 #include "core/html/HTMLMediaElement.h" | 7 #include "core/html/HTMLMediaElement.h" |
8 #include "core/html/track/VideoTrack.h" | 8 #include "core/html/track/VideoTrack.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 return -1; | 40 return -1; |
41 } | 41 } |
42 | 42 |
43 void VideoTrackList::trackSelected(WebMediaPlayer::TrackId selectedTrackId) | 43 void VideoTrackList::trackSelected(WebMediaPlayer::TrackId selectedTrackId) |
44 { | 44 { |
45 // Clear the selected flag on the previously selected track, if any. | 45 // Clear the selected flag on the previously selected track, if any. |
46 for (unsigned i = 0; i < length(); ++i) { | 46 for (unsigned i = 0; i < length(); ++i) { |
47 VideoTrack* track = anonymousIndexedGetter(i); | 47 VideoTrack* track = anonymousIndexedGetter(i); |
48 | 48 |
49 if (track->trackId() != selectedTrackId) | 49 if (track->id() != selectedTrackId) |
50 track->clearSelected(); | 50 track->clearSelected(); |
51 else | 51 else |
52 DCHECK(track->selected()); | 52 DCHECK(track->selected()); |
53 } | 53 } |
54 | 54 |
55 scheduleChangeEvent(); | 55 scheduleChangeEvent(); |
56 } | 56 } |
57 | 57 |
58 } // namespace blink | 58 } // namespace blink |
OLD | NEW |