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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 DCHECK(isMainThread()); 135 DCHECK(isMainThread());
136 136
137 if (context.isContextClosed()) { 137 if (context.isContextClosed()) {
138 context.throwExceptionForClosedState(exceptionState); 138 context.throwExceptionForClosedState(exceptionState);
139 return nullptr; 139 return nullptr;
140 } 140 }
141 141
142 if (!numberOfOutputs || 142 if (!numberOfOutputs ||
143 numberOfOutputs > BaseAudioContext::maxNumberOfChannels()) { 143 numberOfOutputs > BaseAudioContext::maxNumberOfChannels()) {
144 exceptionState.throwDOMException( 144 exceptionState.throwDOMException(
145 IndexSizeError, ExceptionMessages::indexOutsideRange<size_t>( 145 IndexSizeError,
146 "number of outputs", numberOfOutputs, 1, 146 ExceptionMessages::indexOutsideRange<size_t>(
147 ExceptionMessages::InclusiveBound, 147 "number of outputs", numberOfOutputs, 1,
148 BaseAudioContext::maxNumberOfChannels(), 148 ExceptionMessages::InclusiveBound,
149 ExceptionMessages::InclusiveBound)); 149 BaseAudioContext::maxNumberOfChannels(),
150 ExceptionMessages::InclusiveBound));
150 return nullptr; 151 return nullptr;
151 } 152 }
152 153
153 return new ChannelSplitterNode(context, numberOfOutputs); 154 return new ChannelSplitterNode(context, numberOfOutputs);
154 } 155 }
155 156
156 ChannelSplitterNode* ChannelSplitterNode::create( 157 ChannelSplitterNode* ChannelSplitterNode::create(
157 BaseAudioContext* context, 158 BaseAudioContext* context,
158 const ChannelSplitterOptions& options, 159 const ChannelSplitterOptions& options,
159 ExceptionState& exceptionState) { 160 ExceptionState& exceptionState) {
160 ChannelSplitterNode* node = 161 ChannelSplitterNode* node =
161 create(*context, options.numberOfOutputs(), exceptionState); 162 create(*context, options.numberOfOutputs(), exceptionState);
162 163
163 if (!node) 164 if (!node)
164 return nullptr; 165 return nullptr;
165 166
166 node->handleChannelOptions(options, exceptionState); 167 node->handleChannelOptions(options, exceptionState);
167 168
168 return node; 169 return node;
169 } 170 }
170 171
171 } // namespace blink 172 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698