| Index: Source/modules/webmidi/MIDIPort.cpp
|
| diff --git a/Source/modules/webmidi/MIDIPort.cpp b/Source/modules/webmidi/MIDIPort.cpp
|
| index 0e550401672298e25071f6ef91252856b84e467d..65a20f3b6ddbc44d36556930fd214861a9d61154 100644
|
| --- a/Source/modules/webmidi/MIDIPort.cpp
|
| +++ b/Source/modules/webmidi/MIDIPort.cpp
|
| @@ -31,25 +31,23 @@
|
| #include "config.h"
|
| #include "modules/webmidi/MIDIPort.h"
|
|
|
| +#include "modules/webmidi/MIDIAccess.h"
|
| +
|
| namespace WebCore {
|
|
|
| -MIDIPort::MIDIPort(ExecutionContext* context, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode type, const String& version)
|
| - : ActiveDOMObject(context)
|
| - , m_id(id)
|
| +MIDIPort::MIDIPort(MIDIAccess* access, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode type, const String& version)
|
| + : m_id(id)
|
| , m_manufacturer(manufacturer)
|
| , m_name(name)
|
| , m_type(type)
|
| , m_version(version)
|
| + , m_access(access)
|
| {
|
| + ASSERT(access);
|
| ASSERT(type == MIDIPortTypeInput || type == MIDIPortTypeOutput);
|
| ScriptWrappable::init(this);
|
| }
|
|
|
| -MIDIPort::~MIDIPort()
|
| -{
|
| - stop();
|
| -}
|
| -
|
| String MIDIPort::type() const
|
| {
|
| switch (m_type) {
|
| @@ -63,4 +61,9 @@ String MIDIPort::type() const
|
| return emptyString();
|
| }
|
|
|
| +ExecutionContext* MIDIPort::executionContext() const
|
| +{
|
| + return m_access->executionContext();
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|