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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 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
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // that the context has been closed. 308 // that the context has been closed.
309 setContextState(Closed); 309 setContextState(Closed);
310 310
311 AudioBuffer* renderedBuffer = renderTarget(); 311 AudioBuffer* renderedBuffer = renderTarget();
312 312
313 ASSERT(renderedBuffer); 313 ASSERT(renderedBuffer);
314 if (!renderedBuffer) 314 if (!renderedBuffer)
315 return; 315 return;
316 316
317 // Avoid firing the event if the document has already gone away. 317 // Avoid firing the event if the document has already gone away.
318 if (executionContext()) { 318 if (getExecutionContext()) {
319 // Call the offline rendering completion event listener and resolve the 319 // Call the offline rendering completion event listener and resolve the
320 // promise too. 320 // promise too.
321 dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); 321 dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer));
322 m_completeResolver->resolve(renderedBuffer); 322 m_completeResolver->resolve(renderedBuffer);
323 } else { 323 } else {
324 // The resolver should be rejected when the execution context is gone. 324 // The resolver should be rejected when the execution context is gone.
325 m_completeResolver->reject(DOMException::create(InvalidStateError, 325 m_completeResolver->reject(DOMException::create(InvalidStateError,
326 "the execution context does not exist")); 326 "the execution context does not exist"));
327 } 327 }
328 } 328 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Note that the GraphLock is required before this check. Since this needs 389 // Note that the GraphLock is required before this check. Since this needs
390 // to run on the audio thread, OfflineGraphAutoLocker must be used. 390 // to run on the audio thread, OfflineGraphAutoLocker must be used.
391 if (m_scheduledSuspends.contains(currentSampleFrame())) 391 if (m_scheduledSuspends.contains(currentSampleFrame()))
392 return true; 392 return true;
393 393
394 return false; 394 return false;
395 } 395 }
396 396
397 } // namespace blink 397 } // namespace blink
398 398
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698