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

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 352603002: Remove the unused Document& argument to the TextTrack constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | Source/core/html/track/InbandTextTrack.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) 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 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) 2499 if (!RuntimeEnabledFeatures::audioVideoTracksEnabled())
2500 return; 2500 return;
2501 2501
2502 videoTracks().remove(trackId); 2502 videoTracks().remove(trackId);
2503 } 2503 }
2504 2504
2505 void HTMLMediaElement::mediaPlayerDidAddTextTrack(WebInbandTextTrack* webTrack) 2505 void HTMLMediaElement::mediaPlayerDidAddTextTrack(WebInbandTextTrack* webTrack)
2506 { 2506 {
2507 // 4.8.10.12.2 Sourcing in-band text tracks 2507 // 4.8.10.12.2 Sourcing in-band text tracks
2508 // 1. Associate the relevant data with a new text track and its correspondin g new TextTrack object. 2508 // 1. Associate the relevant data with a new text track and its correspondin g new TextTrack object.
2509 RefPtrWillBeRawPtr<InbandTextTrack> textTrack = InbandTextTrack::create(docu ment(), webTrack); 2509 RefPtrWillBeRawPtr<InbandTextTrack> textTrack = InbandTextTrack::create(webT rack);
2510 2510
2511 // 2. Set the new text track's kind, label, and language based on the semant ics of the relevant data, 2511 // 2. Set the new text track's kind, label, and language based on the semant ics of the relevant data,
2512 // as defined by the relevant specification. If there is no label in that da ta, then the label must 2512 // as defined by the relevant specification. If there is no label in that da ta, then the label must
2513 // be set to the empty string. 2513 // be set to the empty string.
2514 // 3. Associate the text track list of cues with the rules for updating the text track rendering appropriate 2514 // 3. Associate the text track list of cues with the rules for updating the text track rendering appropriate
2515 // for the format in question. 2515 // for the format in question.
2516 // 4. If the new text track's kind is metadata, then set the text track in-b and metadata track dispatch type 2516 // 4. If the new text track's kind is metadata, then set the text track in-b and metadata track dispatch type
2517 // as follows, based on the type of the media resource: 2517 // as follows, based on the type of the media resource:
2518 // 5. Populate the new text track's list of cues with the cues parsed so far , folllowing the guidelines for exposing 2518 // 5. Populate the new text track's list of cues with the cues parsed so far , folllowing the guidelines for exposing
2519 // cues, and begin updating it dynamically as necessary. 2519 // cues, and begin updating it dynamically as necessary.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 exceptionState.throwDOMException(SyntaxError, "The 'kind' provided ('" + kind + "') is invalid."); 2596 exceptionState.throwDOMException(SyntaxError, "The 'kind' provided ('" + kind + "') is invalid.");
2597 return nullptr; 2597 return nullptr;
2598 } 2598 }
2599 2599
2600 // 2. If the label argument was omitted, let label be the empty string. 2600 // 2. If the label argument was omitted, let label be the empty string.
2601 // 3. If the language argument was omitted, let language be the empty string . 2601 // 3. If the language argument was omitted, let language be the empty string .
2602 // 4. Create a new TextTrack object. 2602 // 4. Create a new TextTrack object.
2603 2603
2604 // 5. Create a new text track corresponding to the new object, and set its t ext track kind to kind, its text 2604 // 5. Create a new text track corresponding to the new object, and set its t ext track kind to kind, its text
2605 // track label to label, its text track language to language... 2605 // track label to label, its text track language to language...
2606 RefPtrWillBeRawPtr<TextTrack> textTrack = TextTrack::create(document(), kind , label, language); 2606 RefPtrWillBeRawPtr<TextTrack> textTrack = TextTrack::create(kind, label, lan guage);
2607 2607
2608 // Note, due to side effects when changing track parameters, we have to 2608 // Note, due to side effects when changing track parameters, we have to
2609 // first append the track to the text track list. 2609 // first append the track to the text track list.
2610 2610
2611 // 6. Add the new text track to the media element's list of text tracks. 2611 // 6. Add the new text track to the media element's list of text tracks.
2612 addTextTrack(textTrack.get()); 2612 addTextTrack(textTrack.get());
2613 2613
2614 // ... its text track readiness state to the text track loaded state ... 2614 // ... its text track readiness state to the text track loaded state ...
2615 textTrack->setReadinessState(TextTrack::Loaded); 2615 textTrack->setReadinessState(TextTrack::Loaded);
2616 2616
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3961 3961
3962 #if ENABLE(WEB_AUDIO) 3962 #if ENABLE(WEB_AUDIO)
3963 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3963 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3964 { 3964 {
3965 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3965 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3966 audioSourceProvider()->setClient(0); 3966 audioSourceProvider()->setClient(0);
3967 } 3967 }
3968 #endif 3968 #endif
3969 3969
3970 } 3970 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/track/InbandTextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698