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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 years, 10 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ASSERT(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 bool TextTrackCue::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event) 139 DispatchEventResult TextTrackCue::dispatchEventInternal(PassRefPtrWillBeRawPtr<E vent> 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 false; 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 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrackCue>::trace(vis itor); 156 RefCountedGarbageCollectedEventTargetWithInlineData<TextTrackCue>::trace(vis itor);
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/track/TextTrackCue.h ('k') | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698