| Index: Source/modules/webmidi/MIDIAccess.h
|
| diff --git a/Source/modules/webmidi/MIDIAccess.h b/Source/modules/webmidi/MIDIAccess.h
|
| index 792b979f525fa0dea2de5147804f77850a156ce6..bb36ee27596da7649b5fe79433a2eaf29a96f0dd 100644
|
| --- a/Source/modules/webmidi/MIDIAccess.h
|
| +++ b/Source/modules/webmidi/MIDIAccess.h
|
| @@ -34,8 +34,10 @@
|
| #include "bindings/v8/ScriptWrappable.h"
|
| #include "core/dom/ActiveDOMObject.h"
|
| #include "core/dom/EventTarget.h"
|
| +#include "core/platform/midi/MIDIAccessor.h"
|
| #include "modules/webmidi/MIDIInput.h"
|
| #include "modules/webmidi/MIDIOutput.h"
|
| +#include "wtf/OwnPtr.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/Vector.h"
|
| @@ -44,7 +46,7 @@ namespace WebCore {
|
|
|
| class ScriptExecutionContext;
|
|
|
| -class MIDIAccess : public RefCounted<MIDIAccess>, public ScriptWrappable, public ActiveDOMObject, public EventTarget {
|
| +class MIDIAccess : public ActiveDOMObject, public RefCounted<MIDIAccess>, public EventTarget, public MIDIAccessorClient {
|
| public:
|
| virtual ~MIDIAccess();
|
| static PassRefPtr<MIDIAccess> create(ScriptExecutionContext*);
|
| @@ -65,6 +67,12 @@ public:
|
| // ActiveDOMObject
|
| virtual bool canSuspend() const OVERRIDE { return true; }
|
|
|
| + // MIDIAccessorClient
|
| + virtual void addInputPort(const String& id, const String& manufacturer, const String& name, const String& version) OVERRIDE;
|
| + virtual void addOutputPort(const String& id, const String& manufacturer, const String& name, const String& version) OVERRIDE;
|
| + virtual void accessApproved(bool approved) OVERRIDE;
|
| + virtual void receiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) OVERRIDE;
|
| +
|
| private:
|
| explicit MIDIAccess(ScriptExecutionContext*);
|
|
|
| @@ -77,6 +85,8 @@ private:
|
| MIDIInputVector m_inputs;
|
| MIDIOutputVector m_outputs;
|
| EventTargetData m_eventTargetData;
|
| +
|
| + OwnPtr<MIDIAccessor> m_midiAccessor;
|
| };
|
|
|
| } // namespace WebCore
|
|
|