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

Unified Diff: Source/modules/webmidi/MIDIOutput.cpp

Issue 23609033: Web MIDI: MIDIPort doesn't have to be ActiveDOMObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert idl changes Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.h ('k') | Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/modules/webmidi/MIDIOutput.cpp b/Source/modules/webmidi/MIDIOutput.cpp
index 062b3f7c7879b34b6096a95d4059de8af2c8abd7..5b66c23ef079180bc04bb7cd8c15851759d9d7e7 100644
--- a/Source/modules/webmidi/MIDIOutput.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -163,17 +163,15 @@ private:
} // namespace
-PassRefPtr<MIDIOutput> MIDIOutput::create(MIDIAccess* access, unsigned portIndex, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
+PassRefPtr<MIDIOutput> MIDIOutput::create(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version)
{
ASSERT(access);
- RefPtr<MIDIOutput> output = adoptRef(new MIDIOutput(access, portIndex, context, id, manufacturer, name, version));
- output->suspendIfNeeded();
+ RefPtr<MIDIOutput> output = adoptRef(new MIDIOutput(access, portIndex, id, manufacturer, name, version));
return output.release();
}
-MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
- : MIDIPort(context, id, manufacturer, name, MIDIPortTypeOutput, version)
- , m_access(access)
+MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version)
+ : MIDIPort(access, id, manufacturer, name, MIDIPortTypeOutput, version)
, m_portIndex(portIndex)
{
ScriptWrappable::init(this);
@@ -188,8 +186,8 @@ void MIDIOutput::send(Uint8Array* array, double timestamp, ExceptionState& excep
if (!array)
return;
- if (MessageValidator::validate(array, exceptionState, m_access->sysExEnabled()))
- m_access->sendMIDIData(m_portIndex, array->data(), array->length(), timestamp);
+ if (MessageValidator::validate(array, exceptionState, midiAccess()->sysExEnabled()))
+ midiAccess()->sendMIDIData(m_portIndex, array->data(), array->length(), timestamp);
}
void MIDIOutput::send(Vector<unsigned> unsignedData, double timestamp, ExceptionState& exceptionState)
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.h ('k') | Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698