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

Unified Diff: Source/modules/webmidi/MIDIInput.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/MIDIInput.h ('k') | Source/modules/webmidi/MIDIInput.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIInput.cpp
diff --git a/Source/modules/webmidi/MIDIInput.cpp b/Source/modules/webmidi/MIDIInput.cpp
index 748b844e226101199ac26237eabd698e5994fb7c..2b0a83f20fedf0d8f9d5aa83338897a0efa8b20f 100644
--- a/Source/modules/webmidi/MIDIInput.cpp
+++ b/Source/modules/webmidi/MIDIInput.cpp
@@ -36,17 +36,15 @@
namespace WebCore {
-PassRefPtr<MIDIInput> MIDIInput::create(MIDIAccess* access, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
+PassRefPtr<MIDIInput> MIDIInput::create(MIDIAccess* access, const String& id, const String& manufacturer, const String& name, const String& version)
{
ASSERT(access);
- RefPtr<MIDIInput> input = adoptRef(new MIDIInput(access, context, id, manufacturer, name, version));
- input->suspendIfNeeded();
+ RefPtr<MIDIInput> input = adoptRef(new MIDIInput(access, id, manufacturer, name, version));
return input.release();
}
-MIDIInput::MIDIInput(MIDIAccess* access, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
- : MIDIPort(context, id, manufacturer, name, MIDIPortTypeInput, version)
- , m_access(access)
+MIDIInput::MIDIInput(MIDIAccess* access, const String& id, const String& manufacturer, const String& name, const String& version)
+ : MIDIPort(access, id, manufacturer, name, MIDIPortTypeInput, version)
{
ScriptWrappable::init(this);
}
@@ -61,7 +59,7 @@ void MIDIInput::didReceiveMIDIData(unsigned portIndex, const unsigned char* data
// Drop SysEx message here when the client does not request it. Note that this is not a security check but an
// automatic filtering for clients that do not want SysEx message. Also note that SysEx message will never be sent
// unless the current process has an explicit permission to handle SysEx message.
- if (data[0] == 0xf0 && !m_access->sysExEnabled())
+ if (data[0] == 0xf0 && !midiAccess()->sysExEnabled())
return;
RefPtr<Uint8Array> array = Uint8Array::create(data, length);
dispatchEvent(MIDIMessageEvent::create(timeStamp, array));
« no previous file with comments | « Source/modules/webmidi/MIDIInput.h ('k') | Source/modules/webmidi/MIDIInput.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698