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

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

Issue 18858006: Implement MIDIOutput.send() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: forward declare MIDIAccess Created 7 years, 5 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/MIDIOutput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIOutput.h
diff --git a/Source/modules/webmidi/MIDIOutput.h b/Source/modules/webmidi/MIDIOutput.h
index cecb98a724b7c4178bb95d9fe16ac1655c08f2f7..824d4773709cbc48f05dc44c4911c7855cb0602d 100644
--- a/Source/modules/webmidi/MIDIOutput.h
+++ b/Source/modules/webmidi/MIDIOutput.h
@@ -32,22 +32,31 @@
#define MIDIOutput_h
#include "modules/webmidi/MIDIPort.h"
+#include "wtf/RefPtr.h"
#include "wtf/Uint8Array.h"
namespace WebCore {
+class MIDIAccess;
class ScriptExecutionContext;
class MIDIOutput : public MIDIPort {
public:
- static PassRefPtr<MIDIOutput> create(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+ static PassRefPtr<MIDIOutput> create(MIDIAccess*, unsigned portIndex, ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
virtual ~MIDIOutput() { }
- void send(Uint8Array*, double timestamp = 0);
- void send(Vector<unsigned>, double timestamp = 0);
+ void send(Uint8Array*, double timestamp, ExceptionCode&);
+ void send(Vector<unsigned>, double timestamp, ExceptionCode&);
+
+ // send() without optional |timestamp|.
+ void send(Uint8Array*, ExceptionCode&);
+ void send(Vector<unsigned>, ExceptionCode&);
private:
- MIDIOutput(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+ MIDIOutput(MIDIAccess*, unsigned portIndex, ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+
+ RefPtr<MIDIAccess> m_access;
+ unsigned m_portIndex;
};
typedef Vector<RefPtr<MIDIOutput> > MIDIOutputVector;
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.cpp ('k') | Source/modules/webmidi/MIDIOutput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698