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

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

Issue 14442004: Web MIDI: implement MIDIOutput (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NoInterfaceObject Created 7 years, 7 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/modules.gypi ('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/MIDIErrorCallback.h b/Source/modules/webmidi/MIDIOutput.h
similarity index 73%
copy from Source/modules/webmidi/MIDIErrorCallback.h
copy to Source/modules/webmidi/MIDIOutput.h
index 3a0e41edbee99b7c447866ce544afa475c131c10..6269c4cd6ba343a6f3edabf53c8a4e8e16df151b 100644
--- a/Source/modules/webmidi/MIDIErrorCallback.h
+++ b/Source/modules/webmidi/MIDIOutput.h
@@ -28,26 +28,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MIDIErrorCallback_h
-#define MIDIErrorCallback_h
+#ifndef MIDIOutput_h
+#define MIDIOutput_h
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include "modules/webmidi/MIDIPort.h"
+#include "wtf/Uint8Array.h"
namespace WebCore {
-class DOMError;
class ScriptExecutionContext;
-class MIDIErrorCallback : public RefCounted<MIDIErrorCallback> {
+class MIDIOutput : public MIDIPort {
public:
- virtual ~MIDIErrorCallback() { }
- virtual bool handleEvent(DOMError*) = 0;
+ static PassRefPtr<MIDIOutput> create(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
+ virtual ~MIDIOutput() { }
- // Helper to post callback task.
- void scheduleCallback(ScriptExecutionContext*, PassRefPtr<DOMError>);
+ void send(Uint8Array*, double timestamp = 0);
+ void send(Vector<unsigned>, double timestamp = 0);
+
+private:
+ MIDIOutput(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
};
} // namespace WebCore
-#endif // MIDIErrorCallback_h
+#endif // MIDIOutput_h
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/webmidi/MIDIOutput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698