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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 DCHECK(isMainThread()); 142 DCHECK(isMainThread());
143 143
144 if (context.isContextClosed()) { 144 if (context.isContextClosed()) {
145 context.throwExceptionForClosedState(exceptionState); 145 context.throwExceptionForClosedState(exceptionState);
146 return nullptr; 146 return nullptr;
147 } 147 }
148 148
149 if (!numberOfInputs || 149 if (!numberOfInputs ||
150 numberOfInputs > BaseAudioContext::maxNumberOfChannels()) { 150 numberOfInputs > BaseAudioContext::maxNumberOfChannels()) {
151 exceptionState.throwDOMException( 151 exceptionState.throwDOMException(
152 IndexSizeError, ExceptionMessages::indexOutsideRange<size_t>( 152 IndexSizeError,
153 "number of inputs", numberOfInputs, 1, 153 ExceptionMessages::indexOutsideRange<size_t>(
154 ExceptionMessages::InclusiveBound, 154 "number of inputs", numberOfInputs, 1,
155 BaseAudioContext::maxNumberOfChannels(), 155 ExceptionMessages::InclusiveBound,
156 ExceptionMessages::InclusiveBound)); 156 BaseAudioContext::maxNumberOfChannels(),
157 ExceptionMessages::InclusiveBound));
157 return nullptr; 158 return nullptr;
158 } 159 }
159 160
160 return new ChannelMergerNode(context, numberOfInputs); 161 return new ChannelMergerNode(context, numberOfInputs);
161 } 162 }
162 163
163 ChannelMergerNode* ChannelMergerNode::create( 164 ChannelMergerNode* ChannelMergerNode::create(
164 BaseAudioContext* context, 165 BaseAudioContext* context,
165 const ChannelMergerOptions& options, 166 const ChannelMergerOptions& options,
166 ExceptionState& exceptionState) { 167 ExceptionState& exceptionState) {
167 ChannelMergerNode* node = 168 ChannelMergerNode* node =
168 create(*context, options.numberOfInputs(), exceptionState); 169 create(*context, options.numberOfInputs(), exceptionState);
169 170
170 if (!node) 171 if (!node)
171 return nullptr; 172 return nullptr;
172 173
173 node->handleChannelOptions(options, exceptionState); 174 node->handleChannelOptions(options, exceptionState);
174 175
175 return node; 176 return node;
176 } 177 }
177 178
178 } // namespace blink 179 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698