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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 double ScriptProcessorHandler::latencyTime() const { 303 double ScriptProcessorHandler::latencyTime() const {
304 return std::numeric_limits<double>::infinity(); 304 return std::numeric_limits<double>::infinity();
305 } 305 }
306 306
307 void ScriptProcessorHandler::setChannelCount(unsigned long channelCount, 307 void ScriptProcessorHandler::setChannelCount(unsigned long channelCount,
308 ExceptionState& exceptionState) { 308 ExceptionState& exceptionState) {
309 DCHECK(isMainThread()); 309 DCHECK(isMainThread());
310 BaseAudioContext::AutoLocker locker(context()); 310 BaseAudioContext::AutoLocker locker(context());
311 311
312 if (channelCount != m_channelCount) { 312 if (channelCount != m_channelCount) {
313 exceptionState.throwDOMException( 313 exceptionState.throwDOMException(NotSupportedError,
314 NotSupportedError, "channelCount cannot be changed from " + 314 "channelCount cannot be changed from " +
315 String::number(m_channelCount) + " to " + 315 String::number(m_channelCount) +
316 String::number(channelCount)); 316 " to " + String::number(channelCount));
317 } 317 }
318 } 318 }
319 319
320 void ScriptProcessorHandler::setChannelCountMode( 320 void ScriptProcessorHandler::setChannelCountMode(
321 const String& mode, 321 const String& mode,
322 ExceptionState& exceptionState) { 322 ExceptionState& exceptionState) {
323 DCHECK(isMainThread()); 323 DCHECK(isMainThread());
324 BaseAudioContext::AutoLocker locker(context()); 324 BaseAudioContext::AutoLocker locker(context());
325 325
326 if ((mode == "max") || (mode == "clamped-max")) { 326 if ((mode == "max") || (mode == "clamped-max")) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 // If |onaudioprocess| event handler is defined, the node should not be 481 // If |onaudioprocess| event handler is defined, the node should not be
482 // GCed even if it is out of scope. 482 // GCed even if it is out of scope.
483 if (hasEventListeners(EventTypeNames::audioprocess)) 483 if (hasEventListeners(EventTypeNames::audioprocess))
484 return true; 484 return true;
485 485
486 return false; 486 return false;
487 } 487 }
488 488
489 } // namespace blink 489 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698