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

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

Issue 993613005: Stop pushing the value of 'default' to LoadableTextTrack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/LoadableTextTrack.h ('k') | Source/core/html/track/TextTrack.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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 21 matching lines...) Expand all
32 #include "core/html/track/vtt/VTTRegionList.h" 32 #include "core/html/track/vtt/VTTRegionList.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 using namespace HTMLNames; 36 using namespace HTMLNames;
37 37
38 LoadableTextTrack::LoadableTextTrack(HTMLTrackElement* track) 38 LoadableTextTrack::LoadableTextTrack(HTMLTrackElement* track)
39 : TextTrack(emptyAtom, emptyAtom, emptyAtom, emptyAtom, TrackElement) 39 : TextTrack(emptyAtom, emptyAtom, emptyAtom, emptyAtom, TrackElement)
40 , m_trackElement(track) 40 , m_trackElement(track)
41 , m_loadTimer(this, &LoadableTextTrack::loadTimerFired) 41 , m_loadTimer(this, &LoadableTextTrack::loadTimerFired)
42 , m_isDefault(false)
43 { 42 {
44 } 43 }
45 44
46 LoadableTextTrack::~LoadableTextTrack() 45 LoadableTextTrack::~LoadableTextTrack()
47 { 46 {
48 #if !ENABLE(OILPAN) 47 #if !ENABLE(OILPAN)
49 ASSERT(!m_trackElement); 48 ASSERT(!m_trackElement);
50 #endif 49 #endif
51 } 50 }
52 51
53 #if !ENABLE(OILPAN) 52 #if !ENABLE(OILPAN)
54 void LoadableTextTrack::clearTrackElement() 53 void LoadableTextTrack::clearTrackElement()
55 { 54 {
56 m_trackElement = nullptr; 55 m_trackElement = nullptr;
57 } 56 }
58 #endif 57 #endif
59 58
59 bool LoadableTextTrack::isDefault() const
60 {
61 ASSERT(m_trackElement);
62 return m_trackElement->fastHasAttribute(defaultAttr);
63 }
64
60 void LoadableTextTrack::setMode(const AtomicString& mode) 65 void LoadableTextTrack::setMode(const AtomicString& mode)
61 { 66 {
62 TextTrack::setMode(mode); 67 TextTrack::setMode(mode);
63 #if !ENABLE(OILPAN) 68 #if !ENABLE(OILPAN)
64 if (!m_trackElement) 69 if (!m_trackElement)
65 return; 70 return;
66 #endif 71 #endif
67 72
68 if (m_trackElement->readyState() == HTMLTrackElement::NONE) 73 if (m_trackElement->readyState() == HTMLTrackElement::NONE)
69 m_trackElement->scheduleLoad(); 74 m_trackElement->scheduleLoad();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 173 }
169 174
170 DEFINE_TRACE(LoadableTextTrack) 175 DEFINE_TRACE(LoadableTextTrack)
171 { 176 {
172 visitor->trace(m_trackElement); 177 visitor->trace(m_trackElement);
173 visitor->trace(m_loader); 178 visitor->trace(m_loader);
174 TextTrack::trace(visitor); 179 TextTrack::trace(visitor);
175 } 180 }
176 181
177 } // namespace blink 182 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/track/LoadableTextTrack.h ('k') | Source/core/html/track/TextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698