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

Side by Side Diff: Source/modules/webaudio/AudioScheduledSourceNode.cpp

Issue 149803005: Remove isolated world parameters from event listener attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioScheduledSourceNode.h ('k') | no next file » | 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 "cannot call stop without calling start first."); 162 "cannot call stop without calling start first.");
163 } else { 163 } else {
164 // stop() can be called more than once, with the last call to stop takin g effect, unless the 164 // stop() can be called more than once, with the last call to stop takin g effect, unless the
165 // source has already stopped due to earlier calls to stop. No exception s are thrown in any 165 // source has already stopped due to earlier calls to stop. No exception s are thrown in any
166 // case. 166 // case.
167 when = max(0.0, when); 167 when = max(0.0, when);
168 m_endTime = when; 168 m_endTime = when;
169 } 169 }
170 } 170 }
171 171
172 void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener, DO MWrapperWorld* isolatedWorld) 172 void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener)
173 { 173 {
174 m_hasEndedListener = listener; 174 m_hasEndedListener = listener;
175 setAttributeEventListener(EventTypeNames::ended, listener, isolatedWorld); 175 setAttributeEventListener(EventTypeNames::ended, listener);
176 } 176 }
177 177
178 void AudioScheduledSourceNode::finish() 178 void AudioScheduledSourceNode::finish()
179 { 179 {
180 if (m_playbackState != FINISHED_STATE) { 180 if (m_playbackState != FINISHED_STATE) {
181 // Let the context dereference this AudioNode. 181 // Let the context dereference this AudioNode.
182 context()->notifyNodeFinishedProcessing(this); 182 context()->notifyNodeFinishedProcessing(this);
183 m_playbackState = FINISHED_STATE; 183 m_playbackState = FINISHED_STATE;
184 context()->decrementActiveSourceCount(); 184 context()->decrementActiveSourceCount();
185 } 185 }
(...skipping 20 matching lines...) Expand all
206 void AudioScheduledSourceNode::NotifyEndedTask::notifyEnded() 206 void AudioScheduledSourceNode::NotifyEndedTask::notifyEnded()
207 { 207 {
208 RefPtr<Event> event = Event::create(EventTypeNames::ended); 208 RefPtr<Event> event = Event::create(EventTypeNames::ended);
209 event->setTarget(m_scheduledNode); 209 event->setTarget(m_scheduledNode);
210 m_scheduledNode->dispatchEvent(event.get()); 210 m_scheduledNode->dispatchEvent(event.get());
211 } 211 }
212 212
213 } // namespace WebCore 213 } // namespace WebCore
214 214
215 #endif // ENABLE(WEB_AUDIO) 215 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioScheduledSourceNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698