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

Side by Side Diff: third_party/WebKit/Source/core/html/track/TextTrackCue.cpp

Issue 2003543002: media/track: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 void TextTrackCue::invalidateCueIndex() 123 void TextTrackCue::invalidateCueIndex()
124 { 124 {
125 m_cueIndex = invalidCueIndex; 125 m_cueIndex = invalidCueIndex;
126 } 126 }
127 127
128 unsigned TextTrackCue::cueIndex() 128 unsigned TextTrackCue::cueIndex()
129 { 129 {
130 // This method can only be called on cues while they are associated with 130 // This method can only be called on cues while they are associated with
131 // a(n enabled) track (and hence that track's list of cues should exist.) 131 // a(n enabled) track (and hence that track's list of cues should exist.)
132 ASSERT(track() && track()->cues()); 132 DCHECK(track() && track()->cues());
133 TextTrackCueList* cueList = track()->cues(); 133 TextTrackCueList* cueList = track()->cues();
134 if (!cueList->isCueIndexValid(m_cueIndex)) 134 if (!cueList->isCueIndexValid(m_cueIndex))
135 cueList->validateCueIndexes(); 135 cueList->validateCueIndexes();
136 return m_cueIndex; 136 return m_cueIndex;
137 } 137 }
138 138
139 DispatchEventResult TextTrackCue::dispatchEventInternal(Event* event) 139 DispatchEventResult TextTrackCue::dispatchEventInternal(Event* event)
140 { 140 {
141 // When a TextTrack's mode is disabled: no cues are active, no events fired. 141 // When a TextTrack's mode is disabled: no cues are active, no events fired.
142 if (!track() || track()->mode() == TextTrack::disabledKeyword()) 142 if (!track() || track()->mode() == TextTrack::disabledKeyword())
143 return DispatchEventResult::CanceledBeforeDispatch; 143 return DispatchEventResult::CanceledBeforeDispatch;
144 144
145 return EventTarget::dispatchEventInternal(event); 145 return EventTarget::dispatchEventInternal(event);
146 } 146 }
147 147
148 const AtomicString& TextTrackCue::interfaceName() const 148 const AtomicString& TextTrackCue::interfaceName() const
149 { 149 {
150 return EventTargetNames::TextTrackCue; 150 return EventTargetNames::TextTrackCue;
151 } 151 }
152 152
153 DEFINE_TRACE(TextTrackCue) 153 DEFINE_TRACE(TextTrackCue)
154 { 154 {
155 visitor->trace(m_track); 155 visitor->trace(m_track);
156 EventTargetWithInlineData::trace(visitor); 156 EventTargetWithInlineData::trace(visitor);
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698