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

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

Issue 24070002: Web MIDI: MIDIInput/MIDIOutput should not have reference to MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: (rebase) Created 7 years, 3 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/MIDIAccess.cpp ('k') | Source/modules/webmidi/MIDIInput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIInput.h
diff --git a/Source/modules/webmidi/MIDIInput.h b/Source/modules/webmidi/MIDIInput.h
index 4c560d5b3cedd929ec1d0798e7d85e23a5bf6c15..f3848fea038d3eb420c8ad303997df581be7f641 100644
--- a/Source/modules/webmidi/MIDIInput.h
+++ b/Source/modules/webmidi/MIDIInput.h
@@ -36,11 +36,12 @@
namespace WebCore {
+class MIDIAccess;
class ScriptExecutionContext;
class MIDIInput : public MIDIPort {
public:
- static PassRefPtr<MIDIInput> create(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+ static PassRefPtr<MIDIInput> create(MIDIAccess*, ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
virtual ~MIDIInput() { }
DEFINE_ATTRIBUTE_EVENT_LISTENER(midimessage);
@@ -51,8 +52,12 @@ public:
// |timeStamp| is a DOMHighResTimeStamp in the time coordinate system of performance.now().
void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp);
+ MIDIAccess* midiAccess() const { return m_access; }
+
private:
- MIDIInput(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+ MIDIInput(MIDIAccess*, ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+
+ MIDIAccess* m_access;
};
typedef Vector<RefPtr<MIDIInput> > MIDIInputVector;
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.cpp ('k') | Source/modules/webmidi/MIDIInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698