Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Side by Side Diff: Source/core/html/track/TextTrackList.cpp

Issue 180173002: Rename text track methods to make way for audio & video tracks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/TextTrackList.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 { 251 {
252 return EventTargetNames::TextTrackList; 252 return EventTargetNames::TextTrackList;
253 } 253 }
254 254
255 ExecutionContext* TextTrackList::executionContext() const 255 ExecutionContext* TextTrackList::executionContext() const
256 { 256 {
257 ASSERT(m_owner); 257 ASSERT(m_owner);
258 return m_owner->executionContext(); 258 return m_owner->executionContext();
259 } 259 }
260 260
261 void TextTrackList::clearOwnerAndClients()
262 {
263 m_owner = 0;
264
265 for (unsigned i = 0; i < length(); ++i)
266 item(i)->clearClient();
267 }
268
261 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr <TextTrack> track) 269 void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr <TextTrack> track)
262 { 270 {
263 TrackEventInit initializer; 271 TrackEventInit initializer;
264 initializer.track = track; 272 initializer.track = track;
265 initializer.bubbles = false; 273 initializer.bubbles = false;
266 initializer.cancelable = false; 274 initializer.cancelable = false;
267 275
268 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); 276 m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer));
269 } 277 }
270 278
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // interface, with the track attribute initialized to the text track's 315 // interface, with the track attribute initialized to the text track's
308 // TextTrack object, at the media element's textTracks attribute's 316 // TextTrack object, at the media element's textTracks attribute's
309 // TextTrackList object. 317 // TextTrackList object.
310 scheduleTrackEvent(EventTypeNames::removetrack, track); 318 scheduleTrackEvent(EventTypeNames::removetrack, track);
311 } 319 }
312 320
313 Node* TextTrackList::owner() const 321 Node* TextTrackList::owner() const
314 { 322 {
315 return m_owner; 323 return m_owner;
316 } 324 }
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackList.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698