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

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } // namespace 198 } // namespace
199 199
200 MIDIOutput* MIDIOutput::create(MIDIAccess* access, 200 MIDIOutput* MIDIOutput::create(MIDIAccess* access,
201 unsigned portIndex, 201 unsigned portIndex,
202 const String& id, 202 const String& id,
203 const String& manufacturer, 203 const String& manufacturer,
204 const String& name, 204 const String& name,
205 const String& version, 205 const String& version,
206 PortState state) { 206 PortState state) {
207 DCHECK(access); 207 DCHECK(access);
208 MIDIOutput* output = 208 return new MIDIOutput(access, portIndex, id, manufacturer, name, version,
209 new MIDIOutput(access, portIndex, id, manufacturer, name, version, state); 209 state);
210 output->suspendIfNeeded();
211 return output;
212 } 210 }
213 211
214 MIDIOutput::MIDIOutput(MIDIAccess* access, 212 MIDIOutput::MIDIOutput(MIDIAccess* access,
215 unsigned portIndex, 213 unsigned portIndex,
216 const String& id, 214 const String& id,
217 const String& manufacturer, 215 const String& manufacturer,
218 const String& name, 216 const String& name,
219 const String& version, 217 const String& version,
220 PortState state) 218 PortState state)
221 : MIDIPort(access, id, manufacturer, name, TypeOutput, version, state), 219 : MIDIPort(access, id, manufacturer, name, TypeOutput, version, state),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 void MIDIOutput::send(Vector<unsigned> unsignedData, 271 void MIDIOutput::send(Vector<unsigned> unsignedData,
274 ExceptionState& exceptionState) { 272 ExceptionState& exceptionState) {
275 send(unsignedData, 0.0, exceptionState); 273 send(unsignedData, 0.0, exceptionState);
276 } 274 }
277 275
278 DEFINE_TRACE(MIDIOutput) { 276 DEFINE_TRACE(MIDIOutput) {
279 MIDIPort::trace(visitor); 277 MIDIPort::trace(visitor);
280 } 278 }
281 279
282 } // namespace blink 280 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIInput.cpp ('k') | third_party/WebKit/Source/modules/webmidi/MIDIPort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698