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

Unified Diff: Source/modules/webmidi/MIDIAccess.h

Issue 16288002: Web MIDI API (work in progress) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor compile fix Created 7 years, 6 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/webaudio/AudioContext.idl ('k') | Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIAccess.h
diff --git a/Source/modules/webmidi/MIDIAccess.h b/Source/modules/webmidi/MIDIAccess.h
index 3cbca1f2844635c2b0759d1009483e4d16a4a29d..a6ace646713abef6f69f92c4aaa0fcc7db8bcf9b 100644
--- a/Source/modules/webmidi/MIDIAccess.h
+++ b/Source/modules/webmidi/MIDIAccess.h
@@ -33,8 +33,10 @@
#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"
@@ -43,7 +45,7 @@ namespace WebCore {
class ScriptExecutionContext;
-class MIDIAccess : public ActiveDOMObject, public RefCounted<MIDIAccess>, public EventTarget {
+class MIDIAccess : public ActiveDOMObject, public RefCounted<MIDIAccess>, public EventTarget, public MIDIAccessorClient {
public:
virtual ~MIDIAccess();
static PassRefPtr<MIDIAccess> create(ScriptExecutionContext*);
@@ -64,6 +66,9 @@ public:
// ActiveDOMObject
virtual bool canSuspend() const OVERRIDE { return true; }
+ // MIDIAccessorClient
+ virtual void receiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp);
+
private:
explicit MIDIAccess(ScriptExecutionContext*);
@@ -76,6 +81,8 @@ private:
MIDIInputVector m_inputs;
MIDIOutputVector m_outputs;
EventTargetData m_eventTargetData;
+
+ OwnPtr<MIDIAccessor> m_midiAccessor;
};
} // namespace WebCore
« no previous file with comments | « Source/modules/webaudio/AudioContext.idl ('k') | Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698